* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: #f7f6fb;
  color: #241b35;
  font:
    16px/1.55 "Inter",
    "Segoe UI",
    system-ui,
    sans-serif;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3 {
  line-height: 1.12;
  letter-spacing: -0.045em;
}
h2 {
  font-size: 1.55rem;
}
h3 {
  font-size: 1.09rem;
}
button,
input,
select,
textarea {
  font: inherit;
}
a,
footer button {
  color: #6636a1;
  font-weight: 600;
  text-underline-offset: 3px;
}
button {
  cursor: pointer;
  color: #39294e;
  background: white;
  border: 1px solid #d8d0e3;
  border-radius: 9px;
  padding: 8px 15px;
  font-weight: 600;
}
button:hover {
  background: #f0eaf8;
}
button:disabled {
  opacity: 0.5;
  cursor: default;
}
:focus-visible {
  outline: 3px solid #a047ca;
  outline-offset: 3px;
}
.primary {
  background: #6935ac;
  color: white;
  border-color: #6935ac;
}
.primary:hover {
  background: #512886;
}
.mast {
  background: #fff;
  border-bottom: 1px solid #e5dfeb;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px max(20px, calc((100vw - 1120px) / 2));
}
.mast img {
  display: block;
  max-width: 100%;
}
.mast > a:last-child {
  font-size: 0.9rem;
}
main {
  max-width: 1160px;
  margin: auto;
  padding: 24px 20px 50px;
}
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 19px;
  padding: 36px 38px;
  background: linear-gradient(104deg, #2c174e, #47226c 72%, #5d3684);
  color: white;
}
.hero > div:first-child {
  max-width: 68%;
}
.eyebrow {
  text-transform: uppercase;
  font-size: 0.73rem;
  letter-spacing: 0.13em;
  font-weight: 700;
  color: #785899;
}
.hero .eyebrow {
  color: #e4c7fa;
}
.hero h1 {
  font-size: clamp(2.1rem, 4.1vw, 3.35rem);
  margin: 8px 0;
}
.hero p:last-child {
  color: #f0e5fa;
  max-width: 650px;
}
.weave {
  position: absolute;
  inset: 0 0 0 70%;
  z-index: -1;
  transform: rotate(-18deg);
}
.weave i {
  border: 1px solid #d697f2;
  position: absolute;
  left: 20%;
  top: 13%;
  width: 135px;
  height: 135px;
  border-radius: 23%;
  transform: rotate(35deg);
  box-shadow: inset 0 0 30px #cc8ce529;
}
.weave i:nth-child(2) {
  transform: translate(17px, 8px) rotate(35deg);
}
.weave i:nth-child(3) {
  transform: translate(34px, 16px) rotate(35deg);
}
.weave i:nth-child(4) {
  transform: translate(51px, 24px) rotate(35deg);
}
#systemStatus:not(:empty),
.notice {
  margin: 14px 0;
  padding: 10px 14px;
  background: #fff1d9;
  border-radius: 8px;
  color: #624416;
}
.tabs {
  display: flex;
  gap: 5px;
  overflow: auto;
  margin: 21px 0 18px;
  border-bottom: 1px solid #dad3e2;
}
.tabs button {
  white-space: nowrap;
  border: 0;
  border-bottom: 3px solid transparent;
  padding: 10px 14px;
  background: none;
  border-radius: 4px 4px 0 0;
  color: #645870;
}
.tabs button[aria-pressed="true"] {
  border-color: #7540b4;
  color: #62309c;
}
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.stats > div,
.card {
  background: white;
  border: 1px solid #e0dae7;
  border-radius: 13px;
}
.stats > div {
  padding: 15px 18px;
}
.stats span,
.head p,
td small,
.muted,
.guide p {
  color: #63596e;
}
.stats strong {
  display: block;
  font-size: 1.9rem;
  line-height: 1.25;
  letter-spacing: -0.06em;
}
.stats span {
  font-size: 0.88rem;
}
.card {
  padding: 23px;
}
.head,
.actions,
.foot,
dialog header,
.rowactions {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}
.head p {
  margin-top: 5px;
  font-size: 0.95rem;
}
.head > .primary {
  flex: none;
}
.filters,
.fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}
.filters {
  grid-template-columns: 2fr 1fr 1fr;
  margin: 19px 0 13px;
}
.filters label,
.fields label,
.file {
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: #52435e;
  font-size: 0.85rem;
  font-weight: 590;
}
input,
select,
textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #cfc7d9;
  border-radius: 7px;
  padding: 9px 10px;
  background: white;
  color: #2c2335;
}
textarea {
  resize: vertical;
  min-height: 65px;
}
.table-scroll {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
th {
  font-size: 0.78rem;
  font-weight: 620;
  color: #746781;
  background: #f7f5f9;
}
td,
th {
  padding: 11px 9px;
  border-bottom: 1px solid #eae5ef;
}
td {
  font-size: 0.88rem;
}
td small {
  display: block;
  font-size: 0.78rem;
}
td b {
  font-size: 0.94rem;
}
.pill {
  display: inline-block;
  font-size: 0.75rem;
  background: #eee7f5;
  color: #65467b;
  border-radius: 20px;
  padding: 3px 8px;
}
.action {
  font-size: 0.8rem;
  max-width: 280px;
}
.rowactions {
  justify-content: flex-end;
  gap: 5px;
}
.rowactions button {
  font-size: 0.8rem;
  padding: 6px 8px;
}
.empty {
  text-align: center;
  padding: 35px 12px;
  background: #faf9fc;
  border: 1px dashed #d9cfe3;
  border-radius: 11px;
}
.empty h3 {
  margin-bottom: 7px;
}
.empty p {
  color: #675b70;
  max-width: 550px;
  margin: 0 auto 12px;
}
.guide p {
  margin: 8px 0 15px;
}
.guide {
  max-width: 850px;
  margin: 0 auto;
}
.guide ol {
  padding-left: 1.6rem;
}
.guide li {
  padding-left: 8px;
  margin: 20px 0;
}
.guide li::marker {
  font-weight: 700;
  color: #7846a5;
}
.actions {
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-top: 20px;
}
.example {
  background: #f5effa;
  padding: 14px 17px;
  border-radius: 10px;
}
.example summary {
  cursor: pointer;
  font-weight: 650;
}
hr {
  border: 0;
  border-top: 1px solid #e1dbea;
  margin: 22px 0;
}
.file {
  max-width: 440px;
}
.small {
  gap: 7px;
}
.small > div {
  padding: 10px;
}
.small strong {
  font-size: 1.4rem;
}
footer {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.8rem;
  color: #74697e;
  margin-top: 16px;
}
footer button {
  padding: 0;
  border: 0;
  background: none;
  font-size: 0.8rem;
}
dialog {
  width: min(720px, 95vw);
  max-height: 92dvh;
  padding: 0;
  border: 1px solid #dcd4e4;
  border-radius: 14px;
  color: #241b35;
}
dialog::backdrop {
  background: #21132d80;
}
dialog header,
.foot {
  padding: 16px 21px;
  border-bottom: 1px solid #e4dce9;
}
dialog header .eyebrow {
  margin-bottom: 5px;
}
dialog header button {
  font-size: 1.4rem;
  padding: 0 10px;
}
#fields {
  padding: 15px 21px;
}
.fields {
  margin-bottom: 12px;
}
.wide,
.fields h3,
.fields .hint {
  grid-column: 1/-1;
}
.fields h3 {
  margin: 10px 0 0;
}
.hint {
  font-size: 0.85rem;
  color: #72647b;
}
.foot {
  justify-content: flex-end;
  position: sticky;
  bottom: 0;
  background: #fff;
  border-top: 1px solid #e4dce9;
  border-bottom: 0;
}
.danger {
  margin-right: auto;
  color: #942b48;
}
.notice {
  font-size: 0.9rem;
}
.compact {
  margin: 12px 0;
}
.file input {
  padding: 8px;
}
.metricnote {
  font-size: 0.8rem;
  color: #71627d;
  margin-bottom: 10px;
}
[hidden] {
  display: none !important;
}
@media (max-width: 650px) {
  main {
    padding: 14px 12px 32px;
  }
  .mast {
    padding: 8px 14px;
  }
  .hero {
    padding: 24px 19px;
  }
  .hero > div:first-child {
    max-width: 100%;
  }
  .weave {
    opacity: 0.17;
  }
  .stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }
  .stats > div {
    padding: 10px;
  }
  .stats strong {
    font-size: 1.6rem;
  }
  .stats span {
    font-size: 0.74rem;
  }
  .card {
    padding: 14px;
  }
  .filters {
    grid-template-columns: 1fr 1fr;
  }
  .filters label:first-child {
    grid-column: 1/-1;
  }
  .head {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .fields {
    grid-template-columns: 1fr;
  }
  .tabs button {
    padding: 9px 8px;
    font-size: 0.85rem;
  }
  .foot,
  dialog header,
  #fields {
    padding: 12px;
  }
  .rowactions {
    flex-wrap: wrap;
  }
  .table-scroll td {
    min-width: 116px;
  }
  .small {
    grid-template-columns: repeat(2, 1fr);
  }
  .stats {
    margin-bottom: 12px;
  }
  .guide ol {
    padding-left: 1.2rem;
  }
  .hero h1 {
    max-width: 400px;
  }
  .hero p:last-child {
    font-size: 0.94rem;
  }
}
