.structure-page {
  min-height: 100vh;
  background:
    linear-gradient(180deg, #f1f6fb 0%, #eef4f9 46%, #f8fafc 100%);
  color: #07111f;
}

.structure-hero {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, #071226 0%, #0a1e42 56%, #07334c 100%);
  color: #fff;
}

.structure-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(102deg, transparent 0 42%, rgba(125, 211, 252, 0.10) 42.2%, transparent 43.1% 100%),
    linear-gradient(102deg, transparent 0 68%, rgba(52, 211, 153, 0.055) 68.2%, transparent 69.1% 100%);
}

.structure-shell {
  position: relative;
  margin: 0 auto;
  width: min(100%, 80rem);
  padding: 0 1rem;
}

.structure-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 23rem;
  gap: 2rem;
  align-items: end;
  padding: 3.4rem 0 3rem;
}

.structure-eyebrow {
  color: #93c5fd;
  font-size: 0.9rem;
  font-weight: 800;
}

.structure-hero h1 {
  margin-top: 0.8rem;
  max-width: 12em;
  color: #fff;
  font-size: 3.5rem;
  line-height: 1.02;
  font-weight: 950;
}

.structure-hero p {
  margin-top: 1.1rem;
  max-width: 42rem;
  color: rgba(226, 232, 240, 0.82);
  font-size: 1rem;
  line-height: 1.85;
}

.structure-stats {
  display: grid;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.14);
  border-radius: 1.25rem;
  background: rgba(255, 255, 255, 0.055);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.structure-stats-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.structure-stat {
  padding: 1rem;
  border-bottom: 1px solid rgba(226, 232, 240, 0.12);
}

.structure-stats-row .structure-stat + .structure-stat {
  border-left: 1px solid rgba(226, 232, 240, 0.12);
}

.structure-stat strong {
  display: block;
  color: #fff;
  font-size: 1.75rem;
  line-height: 1;
}

.structure-stat span {
  display: block;
  margin-top: 0.35rem;
  color: rgba(203, 213, 225, 0.74);
  font-size: 0.82rem;
  font-weight: 750;
}

.structure-handoff-note {
  padding: 0.9rem 1rem;
  color: rgba(226, 232, 240, 0.78);
  font-size: 0.82rem;
  line-height: 1.75;
}

.structure-category-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0.9rem 1rem 0.1rem;
}

.structure-category-summary span {
  border: 1px solid rgba(226, 232, 240, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  padding: 0.35rem 0.62rem;
  color: rgba(226, 232, 240, 0.86);
  font-size: 0.76rem;
  font-weight: 850;
}

.structure-layout {
  display: grid;
  grid-template-columns: 23rem minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
  padding: 1.4rem 0 4rem;
}

.structure-panel,
.structure-detail {
  border: 1px solid rgba(203, 213, 225, 0.72);
  border-radius: 1.35rem;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.075);
}

.structure-panel {
  position: sticky;
  top: 6rem;
  overflow: hidden;
}

.structure-panel-head {
  padding: 1.1rem;
  border-bottom: 1px solid rgba(226, 232, 240, 0.92);
}

.structure-search {
  width: 100%;
  border: 1px solid rgba(203, 213, 225, 0.9);
  border-radius: 1rem;
  background: #f8fafc;
  padding: 0.85rem 0.95rem;
  color: #0f172a;
  font-size: 0.92rem;
  outline: none;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.structure-search:focus {
  border-color: rgba(37, 99, 235, 0.42);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.10);
}

.structure-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.8rem;
}

.structure-filter {
  border: 1px solid rgba(203, 213, 225, 0.78);
  border-radius: 999px;
  background: #fff;
  padding: 0.45rem 0.7rem;
  color: #475569;
  font-size: 0.76rem;
  font-weight: 850;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.structure-filter[aria-pressed="true"] {
  border-color: rgba(37, 99, 235, 0.34);
  background: #eff6ff;
  color: #1d4ed8;
}

.structure-quick-filter {
  margin-top: 0.8rem;
  border: 1px solid rgba(203, 213, 225, 0.72);
  border-radius: 1rem;
  background: rgba(248, 250, 252, 0.82);
}

.structure-quick-filter summary {
  display: flex;
  min-height: 2.75rem;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0 0.85rem;
  color: #0f172a;
  font-size: 0.82rem;
  font-weight: 950;
  cursor: pointer;
  list-style: none;
}

.structure-quick-filter summary::-webkit-details-marker {
  display: none;
}

.structure-quick-filter summary::after {
  content: "+";
  display: grid;
  width: 1.35rem;
  height: 1.35rem;
  place-items: center;
  border: 1px solid rgba(148, 163, 184, 0.45);
  border-radius: 999px;
  color: #64748b;
  font-size: 0.9rem;
  line-height: 1;
  transition: transform 160ms ease, border-color 160ms ease, color 160ms ease;
}

.structure-quick-filter[open] summary::after {
  transform: rotate(45deg);
  border-color: rgba(37, 99, 235, 0.34);
  color: #1d4ed8;
}

.structure-quick-filter summary small {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  color: #64748b;
  font-size: 0.7rem;
  font-weight: 800;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.structure-quick-filter-body {
  display: grid;
  gap: 0.75rem;
  border-top: 1px solid rgba(226, 232, 240, 0.88);
  padding: 0.8rem;
}

.structure-filter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.58rem;
}

.structure-filter-control {
  display: grid;
  gap: 0.32rem;
  min-width: 0;
}

.structure-filter-control span {
  color: #64748b;
  font-size: 0.68rem;
  font-weight: 900;
}

.structure-filter-control select,
.structure-filter-control input {
  width: 100%;
  min-height: 2.25rem;
  border: 1px solid rgba(203, 213, 225, 0.82);
  border-radius: 0.7rem;
  background: #fff;
  padding: 0 0.58rem;
  color: #0f172a;
  font-size: 0.78rem;
  font-weight: 800;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.structure-filter-control select:focus,
.structure-filter-control input:focus {
  border-color: rgba(37, 99, 235, 0.38);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.09);
}

.structure-filter-control.is-range {
  grid-column: span 2;
}

.structure-filter-control.is-range div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}

.structure-filter-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border-top: 1px dashed rgba(203, 213, 225, 0.78);
  padding-top: 0.68rem;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 850;
}

.structure-filter-foot button {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: #2563eb;
  font-size: 0.72rem;
  font-weight: 950;
  cursor: pointer;
}

.structure-compliance-mini {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 75;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.structure-compliance-mini-actions {
  position: absolute;
  right: 0;
  bottom: calc(100% + 0.42rem);
  display: none;
  gap: 0.35rem;
  border: 1px solid rgba(203, 213, 225, 0.7);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.18);
  padding: 0.34rem;
  backdrop-filter: blur(12px);
}

.structure-compliance-mini:hover .structure-compliance-mini-actions,
.structure-compliance-mini:focus-within .structure-compliance-mini-actions {
  display: flex;
}

.structure-compliance-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.12);
  padding: 0.52rem 0.68rem;
  color: #334155;
  font-size: 0.72rem;
  font-weight: 950;
  cursor: pointer;
  backdrop-filter: blur(14px);
}

.structure-compliance-trigger strong {
  color: #2563eb;
  font-size: 0.68rem;
}

.structure-compliance-mini-actions button {
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 999px;
  background: rgba(239, 246, 255, 0.72);
  padding: 0.2rem 0.42rem;
  color: #1d4ed8;
  font-size: 0.66rem;
  font-weight: 900;
  cursor: pointer;
}

.structure-compliance-mini-actions button:hover {
  border-color: rgba(37, 99, 235, 0.32);
  background: rgba(219, 234, 254, 0.88);
}

.structure-case-list {
  display: grid;
  gap: 0.72rem;
  max-height: calc(100vh - 17rem);
  overflow: auto;
  padding: 1rem;
}

.structure-case-group {
  display: grid;
  gap: 0.62rem;
}

.structure-case-group[open] {
  gap: 0.7rem;
}

.structure-case-group + .structure-case-group {
  margin-top: 0.75rem;
}

.structure-group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #334155;
  font-size: 0.82rem;
  font-weight: 950;
  cursor: pointer;
  list-style: none;
}

.structure-group-title::-webkit-details-marker {
  display: none;
}

.structure-group-title::before {
  content: "+";
  display: grid;
  width: 1.35rem;
  height: 1.35rem;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(148, 163, 184, 0.42);
  border-radius: 999px;
  color: #64748b;
  font-size: 0.9rem;
  line-height: 1;
  transition: transform 160ms ease, border-color 160ms ease, color 160ms ease;
}

.structure-case-group[open] .structure-group-title::before {
  transform: rotate(45deg);
  border-color: rgba(37, 99, 235, 0.34);
  color: #1d4ed8;
}

.structure-group-title span:first-child {
  min-width: 0;
  flex: 1;
}

.structure-group-title span:last-child {
  color: #94a3b8;
  font-size: 0.74rem;
  font-weight: 850;
}

.structure-group-body {
  display: grid;
  gap: 0.62rem;
}

.structure-case-card {
  display: grid;
  grid-template-columns: 5.4rem minmax(0, 1fr);
  gap: 0.8rem;
  width: 100%;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 1rem;
  background: #fff;
  padding: 0.7rem;
  text-align: left;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.structure-case-card:hover,
.structure-case-card:focus-visible,
.structure-case-card.is-active {
  transform: translateY(-1px);
  border-color: rgba(56, 189, 248, 0.48);
  background: linear-gradient(135deg, #fff, #f8fbff);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  outline: none;
}

.structure-thumb {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 0.8rem;
  background: #f8fafc;
  aspect-ratio: 1.55;
}

.structure-thumb img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.structure-case-title {
  color: #0f172a;
  font-size: 0.94rem;
  font-weight: 900;
  line-height: 1.38;
}

.structure-case-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.45rem;
}

.structure-chip,
.structure-status {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.25rem 0.48rem;
  font-size: 0.68rem;
  font-weight: 850;
  line-height: 1.2;
}

.structure-chip {
  border: 1px solid rgba(203, 213, 225, 0.78);
  background: #f8fafc;
  color: #64748b;
}

.structure-status {
  border: 1px solid rgba(14, 165, 233, 0.22);
  background: rgba(240, 249, 255, 0.95);
  color: #0369a1;
}

.structure-access-badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 999px;
  background: rgba(248, 250, 252, 0.96);
  padding: 0.25rem 0.5rem;
  color: #475569;
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1.2;
}

.structure-access-badge.is-unlocked {
  border-color: rgba(16, 185, 129, 0.26);
  background: rgba(236, 253, 245, 0.96);
  color: #047857;
}

.structure-access-badge.is-pro {
  border-color: rgba(37, 99, 235, 0.26);
  background: rgba(239, 246, 255, 0.96);
  color: #1d4ed8;
}

.structure-access-badge.is-restricted {
  border-color: rgba(217, 119, 6, 0.28);
  background: rgba(255, 251, 235, 0.96);
  color: #92400e;
}

.structure-detail {
  min-width: 0;
  overflow: hidden;
}

.structure-detail-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: start;
  padding: 1.4rem;
  border-bottom: 1px solid rgba(226, 232, 240, 0.92);
}

.structure-detail h2 {
  color: #0f172a;
  font-size: 2rem;
  line-height: 1.15;
  font-weight: 950;
}

.structure-detail-summary {
  margin-top: 0.7rem;
  max-width: 44rem;
  color: #475569;
  font-size: 0.95rem;
  line-height: 1.75;
}

.structure-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: flex-end;
}

.structure-action {
  display: inline-flex;
  min-height: 2.55rem;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(203, 213, 225, 0.82);
  border-radius: 0.95rem;
  background: #fff;
  padding: 0 0.95rem;
  color: #0f172a;
  font-size: 0.84rem;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease;
}

.structure-action:hover,
.structure-action:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(37, 99, 235, 0.32);
  color: #1d4ed8;
  outline: none;
}

.structure-action.is-primary {
  border-color: rgba(15, 23, 42, 0.94);
  background: #0f172a;
  color: #fff;
}

.structure-action.is-primary:hover,
.structure-action.is-primary:focus-visible {
  background: #1d4ed8;
  color: #fff;
}

.structure-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-bottom: 1px solid rgba(226, 232, 240, 0.92);
}

.structure-metric {
  padding: 1rem 1.15rem;
  border-right: 1px solid rgba(226, 232, 240, 0.92);
}

.structure-metric:last-child {
  border-right: 0;
}

.structure-metric span {
  display: block;
  color: #64748b;
  font-size: 0.74rem;
  font-weight: 850;
}

.structure-metric strong {
  display: block;
  margin-top: 0.3rem;
  color: #0f172a;
  font-size: 1.18rem;
  line-height: 1.15;
  font-weight: 950;
}

.structure-preview-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  padding: 1.25rem;
}

.structure-preview-grid.is-single {
  grid-template-columns: 1fr;
}

.structure-figure {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 1.15rem;
  background: #fff;
}

.structure-figure-header {
  display: flex;
  min-height: 3rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid rgba(226, 232, 240, 0.92);
  padding: 0.8rem 1rem;
}

.structure-figure-title {
  color: #0f172a;
  font-size: 0.88rem;
  font-weight: 900;
}

.structure-figure-caption {
  color: #64748b;
  font-size: 0.76rem;
  font-weight: 750;
}

.structure-image-frame {
  display: grid;
  place-items: center;
  background:
    linear-gradient(90deg, rgba(226, 232, 240, 0.32) 1px, transparent 1px),
    linear-gradient(180deg, rgba(226, 232, 240, 0.32) 1px, transparent 1px),
    #f8fafc;
  background-size: 28px 28px;
  padding: 0.75rem;
}

.structure-image-frame img {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
  cursor: zoom-in;
}

.structure-data-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 1rem;
  padding: 0 1.25rem 1.25rem;
}

.structure-data-card {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 1.15rem;
  background: #fff;
}

.structure-data-card h3 {
  border-bottom: 1px solid rgba(226, 232, 240, 0.92);
  padding: 0.9rem 1rem;
  color: #0f172a;
  font-size: 0.95rem;
  font-weight: 950;
}

.structure-lock-panel {
  margin: 1.25rem;
  border: 1px solid rgba(203, 213, 225, 0.86);
  border-radius: 1.15rem;
  background:
    linear-gradient(135deg, rgba(248, 250, 252, 0.98), rgba(239, 246, 255, 0.78));
  padding: 1.25rem;
}

.structure-lock-mark {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  padding: 0.35rem 0.7rem;
  color: #2563eb;
  font-size: 0.76rem;
  font-weight: 950;
}

.structure-lock-panel h3 {
  margin-top: 0.9rem;
  color: #0f172a;
  font-size: 1.28rem;
  line-height: 1.25;
  font-weight: 950;
}

.structure-lock-panel p {
  margin-top: 0.55rem;
  max-width: 40rem;
  color: #475569;
  font-size: 0.94rem;
  line-height: 1.75;
}

.structure-lock-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}

.structure-param-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
}

.structure-param {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(226, 232, 240, 0.82);
}

.structure-param:nth-child(odd) {
  border-right: 1px solid rgba(226, 232, 240, 0.82);
}

.structure-param span {
  display: block;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 850;
}

.structure-param strong {
  display: block;
  margin-top: 0.24rem;
  color: #0f172a;
  font-size: 0.9rem;
  font-weight: 900;
  line-height: 1.4;
}

.structure-table-wrap {
  max-height: 30rem;
  overflow: auto;
}

.structure-surface-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
  min-width: 41rem;
}

.structure-surface-table th,
.structure-surface-table td {
  border-bottom: 1px solid rgba(226, 232, 240, 0.82);
  padding: 0.72rem 0.75rem;
  text-align: left;
}

.structure-surface-table th {
  color: #64748b;
  font-weight: 900;
}

.structure-surface-table td {
  color: #334155;
  font-weight: 700;
}

.structure-surface-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.32rem;
}

.structure-surface-flag {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 999px;
  background: rgba(239, 246, 255, 0.94);
  padding: 0.16rem 0.42rem;
  color: #1d4ed8;
  font-size: 0.68rem;
  font-weight: 900;
  white-space: nowrap;
}

.structure-surface-muted {
  color: #94a3b8;
  font-weight: 800;
}

.structure-toast {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 80;
  max-width: 24rem;
  border: 1px solid rgba(37, 99, 235, 0.22);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16);
  padding: 0.85rem 1rem;
  color: #0f172a;
  font-size: 0.86rem;
  font-weight: 750;
  line-height: 1.55;
}

.structure-toast[hidden] {
  display: none;
}

.structure-payment-modal {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: grid;
  place-items: center;
  background: rgba(2, 6, 23, 0.66);
  padding: 1rem;
}

.structure-payment-card {
  position: relative;
  width: min(100%, 25rem);
  border: 1px solid rgba(226, 232, 240, 0.94);
  border-radius: 1.25rem;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 28px 90px rgba(2, 6, 23, 0.32);
  padding: 1.25rem;
  text-align: center;
}

.structure-payment-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  display: grid;
  width: 2.1rem;
  height: 2.1rem;
  place-items: center;
  border: 1px solid rgba(203, 213, 225, 0.84);
  border-radius: 999px;
  background: #fff;
  color: #475569;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.structure-payment-kicker {
  color: #2563eb;
  font-size: 0.75rem;
  font-weight: 950;
}

.structure-payment-card h3 {
  margin-top: 0.4rem;
  color: #0f172a;
  font-size: 1.2rem;
  font-weight: 950;
  line-height: 1.35;
}

.structure-payment-card p {
  margin: 0.55rem auto 0;
  max-width: 20rem;
  color: #64748b;
  font-size: 0.86rem;
  line-height: 1.7;
}

.structure-payment-qr {
  display: grid;
  place-items: center;
  margin: 1rem auto 0;
  width: 17.5rem;
  max-width: 100%;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 1.05rem;
  background: #fff;
  padding: 0.62rem;
}

.structure-payment-qr canvas,
.structure-payment-qr img {
  display: block;
  width: 16.25rem;
  max-width: 100%;
  height: auto;
}

.structure-payment-status {
  margin-top: 0.85rem;
  color: #334155;
  font-size: 0.84rem;
  font-weight: 850;
}

.structure-payment-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 1rem;
}

.structure-compliance-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  overflow-y: auto;
  background: rgba(2, 6, 23, 0.68);
  padding: 1rem;
}

.structure-compliance-card {
  position: relative;
  width: min(100%, 34rem);
  max-height: min(92vh, 48rem);
  overflow-y: auto;
  border: 1px solid rgba(226, 232, 240, 0.94);
  border-radius: 1.25rem;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 28px 90px rgba(2, 6, 23, 0.34);
  padding: 1.25rem;
}

.structure-compliance-card.is-wide {
  width: min(100%, 44rem);
}

.structure-compliance-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  display: grid;
  width: 2.1rem;
  height: 2.1rem;
  place-items: center;
  border: 1px solid rgba(203, 213, 225, 0.84);
  border-radius: 999px;
  background: #fff;
  color: #475569;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.structure-compliance-card h3 {
  margin-top: 0.35rem;
  padding-right: 2.5rem;
  color: #0f172a;
  font-size: 1.25rem;
  font-weight: 950;
  line-height: 1.35;
}

.structure-compliance-message {
  margin-top: 0.55rem;
  color: #334155;
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.7;
}

.structure-compliance-note {
  margin-top: 0.7rem;
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 0.95rem;
  background: rgba(239, 246, 255, 0.76);
  padding: 0.75rem 0.85rem;
  color: #475569;
  font-size: 0.82rem;
  line-height: 1.65;
}

.structure-legal-document {
  margin-top: 0.85rem;
  overflow: hidden;
  border: 1px solid rgba(203, 213, 225, 0.8);
  border-radius: 1rem;
  background: #fff;
}

.structure-legal-document.is-standalone {
  margin-top: 1rem;
}

.structure-legal-document summary {
  display: flex;
  min-height: 2.8rem;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0 0.9rem;
  color: #0f172a;
  font-size: 0.84rem;
  font-weight: 950;
  cursor: pointer;
  list-style: none;
}

.structure-legal-document summary::-webkit-details-marker {
  display: none;
}

.structure-legal-document summary small {
  min-width: 0;
  overflow: hidden;
  color: #64748b;
  font-size: 0.68rem;
  font-weight: 850;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.structure-legal-document-body {
  display: grid;
  gap: 0.78rem;
  max-height: 18rem;
  overflow-y: auto;
  border-top: 1px solid rgba(226, 232, 240, 0.9);
  padding: 0.9rem;
}

.structure-legal-file {
  color: #2563eb;
  font-size: 0.76rem;
  font-weight: 900;
}

.structure-legal-document-body section {
  display: grid;
  gap: 0.36rem;
}

.structure-legal-document-body h4 {
  color: #0f172a;
  font-size: 0.86rem;
  font-weight: 950;
}

.structure-legal-document-body p {
  color: #475569;
  font-size: 0.8rem;
  line-height: 1.72;
}

.structure-compliance-checks {
  display: grid;
  gap: 0.65rem;
  margin-top: 1rem;
}

.structure-compliance-check {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.65rem;
  align-items: start;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 0.95rem;
  background: rgba(248, 250, 252, 0.86);
  padding: 0.72rem 0.8rem;
  color: #334155;
  font-size: 0.84rem;
  font-weight: 750;
  line-height: 1.55;
}

.structure-compliance-check input {
  margin-top: 0.16rem;
  accent-color: #2563eb;
}

.structure-compliance-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.structure-compliance-form label {
  display: grid;
  gap: 0.35rem;
  color: #475569;
  font-size: 0.76rem;
  font-weight: 900;
}

.structure-compliance-form label:nth-child(n + 4) {
  grid-column: span 3;
}

.structure-compliance-form input,
.structure-compliance-form textarea {
  width: 100%;
  border: 1px solid rgba(203, 213, 225, 0.92);
  border-radius: 0.85rem;
  background: #fff;
  padding: 0.7rem 0.78rem;
  color: #0f172a;
  font: inherit;
  font-size: 0.86rem;
  resize: vertical;
}

.structure-compliance-form input:focus,
.structure-compliance-form textarea:focus {
  border-color: rgba(37, 99, 235, 0.44);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
  outline: none;
}

.structure-compliance-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.6rem;
  margin-top: 1rem;
}

.structure-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: rgba(2, 6, 23, 0.82);
  padding: 2rem;
}

.structure-lightbox img {
  display: block;
  max-width: min(96vw, 90rem);
  max-height: 92vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.42);
}

.structure-lightbox-close {
  position: fixed;
  top: 1rem;
  right: 1rem;
  display: grid;
  width: 2.6rem;
  height: 2.6rem;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.structure-empty {
  padding: 2rem 1rem;
  color: #64748b;
  font-size: 0.9rem;
  font-weight: 750;
  text-align: center;
}

@media (max-width: 1024px) {
  .structure-hero-grid,
  .structure-layout,
  .structure-detail-head,
  .structure-data-grid {
    grid-template-columns: 1fr;
  }

  .structure-panel {
    position: static;
  }

  .structure-case-list {
    max-height: none;
  }

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

@media (max-width: 768px) {
  .structure-hero-grid {
    padding: 2.4rem 0 2rem;
  }

  .structure-hero h1 {
    font-size: 2.55rem;
    line-height: 1.06;
  }

  .structure-hero p {
    font-size: 0.95rem;
  }

  .structure-stats-row,
  .structure-metrics,
  .structure-param-list {
    grid-template-columns: 1fr;
  }

  .structure-filter-grid {
    grid-template-columns: 1fr;
  }

  .structure-filter-control.is-range {
    grid-column: auto;
  }

  .structure-stats-row .structure-stat + .structure-stat,
  .structure-metric,
  .structure-param:nth-child(odd) {
    border-left: 0;
    border-right: 0;
  }

  .structure-case-card {
    grid-template-columns: 4.8rem minmax(0, 1fr);
  }

  .structure-detail h2 {
    font-size: 1.65rem;
  }

  .structure-preview-grid {
    padding: 0.85rem;
  }

  .structure-image-frame {
    padding: 0.55rem;
  }

  .structure-compliance-card {
    padding: 1rem;
  }

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

  .structure-compliance-form label:nth-child(n + 4) {
    grid-column: auto;
  }

  .structure-compliance-actions {
    justify-content: stretch;
  }

  .structure-compliance-actions .structure-action {
    flex: 1 1 10rem;
  }

  .structure-toast {
    right: 1rem;
    bottom: 1rem;
    left: 1rem;
    max-width: none;
  }
}
