:root {
  --modern-font: 'Manrope', sans-serif;
  --modern-bg-top: #050b1d;
  --modern-bg-mid: #0d1730;
  --modern-bg-bottom: #121c31;
  --modern-border: rgba(255, 255, 255, 0.12);
  --modern-text: #f8fafc;
  --modern-muted: #c7d2e3;
  --modern-soft: #8ca0bf;
  --modern-primary: #3b82f6;
  --modern-primary-dark: #2563eb;
  --modern-success: #22c55e;
  --modern-warning: #f59e0b;
  --modern-danger: #ef4444;
  --modern-danger-text: #fecaca;
  --modern-shadow: 0 28px 80px rgba(2, 8, 23, 0.42);
  --modern-shadow-soft: 0 18px 40px rgba(15, 23, 42, 0.24);
  --modern-container-max: 1240px;
}

.modern-shell {
  position: relative;
  min-height: calc(100vh - 70px);
  overflow: hidden;
  background:
    radial-gradient(circle at 8% 15%, rgba(59, 130, 246, 0.20), transparent 24%),
    radial-gradient(circle at 90% 20%, rgba(34, 197, 94, 0.08), transparent 18%),
    radial-gradient(circle at 84% 86%, rgba(14, 165, 233, 0.12), transparent 20%),
    linear-gradient(135deg, var(--modern-bg-top), var(--modern-bg-mid) 54%, var(--modern-bg-bottom));
  color: var(--modern-text);
  font-family: var(--modern-font);
}

.modern-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.86), transparent 92%);
  pointer-events: none;
}

.modern-container {
  position: relative;
  z-index: 1;
  width: min(var(--modern-container-max), calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 48px;
}

.modern-panel {
  border: 1px solid var(--modern-border);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(32, 42, 68, 0.92), rgba(25, 35, 58, 0.84));
  box-shadow: var(--modern-shadow);
  backdrop-filter: blur(16px);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .modern-panel {
    background: rgba(22, 31, 52, 0.96);
  }
}

.modern-panel--padded {
  padding: 32px;
}

.modern-section {
  margin-top: 24px;
}

.modern-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(191, 219, 254, 0.2);
  background: rgba(255, 255, 255, 0.06);
  color: #c7d7f8;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.modern-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--modern-primary);
  box-shadow: 0 0 0 6px rgba(59, 130, 246, 0.12);
  flex: 0 0 auto;
}

.modern-hero-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-top: 20px;
}

.modern-title {
  margin: 0;
  max-width: 760px;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.03;
  letter-spacing: -0.04em;
  font-weight: 800;
  color: #ffffff;
}

.modern-copy {
  margin: 16px 0 0;
  max-width: 760px;
  color: var(--modern-muted);
  font-size: 1rem;
  line-height: 1.9;
}

.modern-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.modern-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.modern-btn:hover {
  transform: translateY(-2px);
}

.modern-btn--primary {
  background: linear-gradient(135deg, var(--modern-primary), var(--modern-primary-dark));
  color: #ffffff;
  box-shadow: 0 16px 30px rgba(37, 99, 235, 0.25);
}

.modern-btn--secondary {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.modern-btn--success {
  background: rgba(34, 197, 94, 0.16);
  border-color: rgba(34, 197, 94, 0.22);
  color: #dcfce7;
}

.modern-btn--warning {
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.22);
  color: #fde68a;
}

.modern-btn--neutral {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
}

.modern-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 28px;
}

.modern-stat {
  padding: 18px 20px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(2, 8, 23, 0.24);
  box-shadow: var(--modern-shadow-soft);
}

.modern-stat-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--modern-soft);
}

.modern-stat-value {
  margin-top: 10px;
  font-size: 1.08rem;
  font-weight: 700;
  color: #ffffff;
}

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

.modern-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 26px;
  border-radius: 28px;
  border: 1px solid var(--modern-border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.08));
  box-shadow: var(--modern-shadow);
  overflow: hidden;
}

.modern-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.16), transparent 40%, rgba(59, 130, 246, 0.14));
  pointer-events: none;
}

.modern-card > * {
  position: relative;
  z-index: 1;
}

.modern-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.modern-card-title {
  margin: 20px 0 0;
  font-size: 1.8rem;
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 800;
  color: #ffffff;
}

.modern-card-text {
  margin: 14px 0 0;
  color: var(--modern-muted);
  font-size: 0.98rem;
  line-height: 1.85;
}

.modern-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  color: #e7eefb;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.modern-detail-list {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.modern-detail {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(2, 8, 23, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.modern-detail-label {
  display: block;
  color: var(--modern-soft);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.modern-detail-value {
  display: block;
  margin-top: 8px;
  color: var(--modern-text);
  font-size: 0.96rem;
  line-height: 1.55;
  font-weight: 600;
}

.modern-card-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.modern-table-panel {
  padding: 24px;
  overflow: visible;
}

.modern-table-wrap {
  overflow-x: auto;
}

.modern-table {
  width: 100%;
  min-width: 760px;
  border-collapse: separate;
  border-spacing: 0;
  color: var(--modern-text);
}

.modern-table thead th {
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  color: #dbeafe;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
}

.modern-table tbody td {
  padding: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(2, 8, 23, 0.18);
  vertical-align: middle;
  text-align: center;
}

.modern-table tbody tr:hover td {
  background: rgba(59, 130, 246, 0.08);
}

.modern-table-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
}

.modern-table-subtitle {
  color: var(--modern-muted);
  font-size: 0.95rem;
}

.modern-table-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.modern-pill {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.82rem;
  font-weight: 700;
}

.modern-pill--success {
  background: rgba(34, 197, 94, 0.14);
  border-color: rgba(34, 197, 94, 0.22);
  color: #dcfce7;
}

.modern-icon-btn {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  text-decoration: none;
  box-shadow: none;
}

.modern-icon-btn--warning {
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(245, 158, 11, 0.22);
  color: #fde68a;
}

.modern-icon-btn--danger {
  background: rgba(239, 68, 68, 0.16);
  border-color: rgba(239, 68, 68, 0.22);
  color: #fecaca;
}

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

.modern-form-grid--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: end;
}

.modern-field {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modern-field--full {
  grid-column: 1 / -1;
}

.modern-label {
  color: var(--modern-soft);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.modern-field input,
.modern-field select,
.modern-field textarea {
  width: 100%;
  min-height: 52px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  box-shadow: none;
  outline: none;
}

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

.modern-field select option {
  color: #0f172a;
}

.modern-errors,
.modern-shell .errorlist,
.modern-field ul.errorlist {
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--modern-danger-text);
  font-size: 0.84rem;
  background: transparent !important;
}

.modern-errors {
  margin-bottom: 18px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(239, 68, 68, 0.22);
  background: rgba(239, 68, 68, 0.12);
}

.modern-shell .errorlist,
.modern-field ul.errorlist {
  border: 0;
}

.modern-shell .errorlist li,
.modern-field ul.errorlist li {
  margin: 0;
  padding: 0;
  background: transparent !important;
}

.modern-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 26px;
  flex-wrap: wrap;
}

.modern-btn--auto {
  width: auto;
}

.modern-spacing-top {
  margin-top: 24px;
}

.modern-hidden-form {
  display: none;
  margin: 0;
}

.modern-empty {
  padding: 32px;
  text-align: center;
}

.modern-empty-title {
  margin: 0;
  font-size: 1.8rem;
  font-weight: 800;
  color: #ffffff;
}

.modern-empty-copy {
  max-width: 620px;
  margin: 14px auto 0;
  color: var(--modern-muted);
  font-size: 0.98rem;
  line-height: 1.8;
}

.modern-floating-menu {
  position: fixed;
  z-index: 2500;
  min-width: 220px;
  padding: 10px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #0f172a;
  box-shadow: 0 22px 50px rgba(2, 8, 23, 0.42);
}

.modern-floating-menu[hidden] {
  display: none;
}

.modern-floating-menu-list {
  display: grid;
  gap: 6px;
}

.modern-floating-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: #e2e8f0;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  text-align: left;
  cursor: pointer;
}

.modern-floating-item:hover,
.modern-floating-item:focus-visible {
  background: rgba(59, 130, 246, 0.14);
  color: #ffffff;
}

.modern-floating-item--danger {
  color: var(--modern-danger-text);
}

.modern-shell :where(a[href], button, input, select, textarea):focus-visible,
.modern-shell :where(.modern-icon-btn, .modern-floating-item):focus-visible {
  outline: 2px solid rgba(191, 219, 254, 0.95);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.18);
}

@media (max-width: 980px) {
  .modern-stats,
  .modern-form-grid--4 {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 760px) {
  .modern-container {
    width: min(100% - 20px, var(--modern-container-max));
    padding-top: 20px;
    padding-bottom: 28px;
  }

  .modern-panel,
  .modern-panel--padded,
  .modern-empty,
  .modern-table-panel {
    border-radius: 22px;
  }

  .modern-panel--padded,
  .modern-table-panel,
  .modern-empty {
    padding: 22px;
  }

  .modern-hero-top,
  .modern-table-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .modern-table-wrap {
    overflow-x: hidden;
  }

  .modern-shell .modern-table {
    display: block;
    width: 100%;
    min-width: 0;
    table-layout: auto !important;
  }

  .modern-shell .modern-table thead {
    display: none;
  }

  .modern-shell .modern-table tbody {
    display: block;
  }

  .modern-shell .modern-table tbody tr {
    display: block;
    width: 100%;
    margin-bottom: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 22px;
    padding: 16px 18px;
  }

  .modern-shell .modern-table tbody td {
    display: block;
    width: 100%;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    text-align: center !important;
  }

  .modern-shell .modern-table tbody td:last-child {
    border-bottom: 0;
    padding-bottom: 0;
  }

  .modern-shell .modern-table tbody td[data-label]::before {
    display: block;
    margin-bottom: 4px;
    content: attr(data-label);
    color: rgba(226, 232, 240, 0.75);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-align: center;
  }

  .modern-shell .modern-table th:last-child,
  .modern-shell .modern-table td:last-child {
    width: auto;
    white-space: normal;
  }
}

@media (max-width: 560px) {
  .modern-grid-2,
  .modern-stats,
  .modern-form-grid,
  .modern-form-grid--4,
  .modern-card-actions {
    grid-template-columns: 1fr;
  }

  .modern-field--full {
    grid-column: auto;
  }

  .modern-actions,
  .modern-form-actions {
    width: 100%;
    justify-content: stretch;
  }

  .modern-btn {
    width: 100%;
  }

  .modern-title,
  .modern-card-title,
  .modern-empty-title {
    font-size: 1.55rem;
  }
}