.app-page {
  background: var(--paper);
}

.form-hero,
.dashboard-hero {
  position: relative;
  overflow: hidden;
  padding: 96px 0 84px;
}

.form-hero::before,
.dashboard-hero::before,
.auth-main::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 70%, rgba(102, 194, 130, 0.18), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.04) 25%, transparent 25%) 0 0 / 42px 42px;
  pointer-events: none;
}

.form-hero-grid,
.dashboard-hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 40px;
  align-items: end;
}

.form-hero h1,
.dashboard-hero h1,
.auth-card h1,
.detail-header h1 {
  max-width: 820px;
  color: var(--white);
  font-size: clamp(2.25rem, 5vw, 4.5rem);
}

.form-hero p:not(.eyebrow),
.dashboard-hero p:not(.eyebrow),
.auth-card p {
  max-width: 720px;
  margin-top: 20px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.08rem;
}

.form-summary,
.dashboard-stats article {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
  padding: 26px;
}

.form-summary strong,
.dashboard-stats strong {
  display: block;
  color: var(--lime);
  font-size: 2rem;
  line-height: 1;
}

.form-summary span,
.dashboard-stats span {
  display: block;
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.82);
}

.dashboard-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-section,
.dashboard-section {
  padding: 72px 0 96px;
}

.form-shell,
.dashboard-shell {
  width: min(100% - 36px, 1120px);
}

.registration-form {
  display: grid;
  gap: 24px;
}

.form-card,
.success-panel,
.table-card,
.auth-card,
.detail-grid,
.dashboard-toolbar {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}

.form-card {
  margin: 0;
  padding: 30px;
}

.form-card legend {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 0 16px;
  color: var(--green-900);
  font-size: 1.18rem;
  font-weight: 900;
}

.form-card legend span {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: var(--lime);
  color: var(--green-900);
}

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

.field,
.login-form {
  display: grid;
  gap: 8px;
}

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

.field > span,
.field-full > span,
.agreement span {
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 900;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 52px;
  border: 1px solid rgba(15, 81, 50, 0.18);
  border-radius: var(--radius);
  background: #fbfffb;
  color: var(--ink);
  font: inherit;
  padding: 13px 15px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--green-600);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(44, 163, 92, 0.12);
}

.field small {
  color: var(--muted);
  font-size: 0.83rem;
}

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

.choice,
.agreement {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 52px;
  border: 1px solid rgba(15, 81, 50, 0.15);
  border-radius: var(--radius);
  background: #fbfffb;
  padding: 13px 14px;
  color: var(--ink);
}

.choice input,
.agreement input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--green-600);
}

.field-error {
  color: #b42318;
  font-size: 0.86rem;
  font-weight: 800;
}

.alert {
  margin-bottom: 18px;
  border-radius: var(--radius);
  padding: 14px 16px;
  font-weight: 800;
}

.alert-error {
  border: 1px solid rgba(180, 35, 24, 0.24);
  background: #fff3f1;
  color: #912018;
}

.agreement-list {
  display: grid;
  gap: 10px;
}

.submit-panel,
.success-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 28px 30px;
}

.submit-panel {
  border-radius: var(--radius);
  background: var(--green-900);
  color: var(--white);
}

.submit-panel strong,
.success-panel strong {
  color: inherit;
}

.submit-panel p {
  color: rgba(255, 255, 255, 0.78);
}

.success-panel {
  display: grid;
}

.success-panel h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
}

.success-panel p {
  max-width: 760px;
}

.form-actions,
.dashboard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.btn-outline-dark {
  border-color: rgba(15, 81, 50, 0.24);
  background: transparent;
  color: var(--green-900);
}

.btn-outline-dark:hover {
  transform: translateY(-2px);
  border-color: var(--green-900);
  background: rgba(0, 57, 28, 0.06);
}

.auth-page {
  min-height: 100vh;
  background: var(--green-900);
}

.auth-main {
  position: relative;
  min-height: calc(100vh - var(--header-height));
  display: grid;
  place-items: center;
  padding: 56px 18px;
}

.auth-card {
  position: relative;
  z-index: 1;
  width: min(100%, 520px);
  padding: 34px;
}

.auth-card h1,
.detail-header h1 {
  color: var(--ink);
  font-size: clamp(2rem, 5vw, 3rem);
}

.auth-card p {
  color: var(--muted);
}

.login-form {
  margin-top: 26px;
}

.dashboard-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: end;
  padding: 18px;
  margin-bottom: 22px;
}

.search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.table-card {
  overflow: hidden;
}

.table-scroll {
  overflow-x: auto;
}

.dashboard-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

.dashboard-table th,
.dashboard-table td {
  border-bottom: 1px solid var(--line);
  padding: 16px;
  text-align: left;
  vertical-align: top;
  font-size: 0.92rem;
}

.dashboard-table th {
  background: var(--green-900);
  color: var(--white);
  font-size: 0.78rem;
  letter-spacing: 0;
  text-transform: uppercase;
}

.dashboard-table td {
  color: var(--ink);
}

.dashboard-table a,
.text-link {
  color: var(--green-600);
  font-weight: 900;
}

.empty-cell {
  text-align: center;
  color: var(--muted);
}

.detail-section {
  padding-top: 64px;
}

.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 22px;
}

.detail-header h1 {
  max-width: 760px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
}

.detail-item {
  display: grid;
  gap: 6px;
  min-width: 0;
  border-bottom: 1px solid var(--line);
  padding: 18px;
}

.detail-item:nth-child(odd) {
  border-right: 1px solid var(--line);
}

.detail-item span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.detail-item strong {
  min-width: 0;
  color: var(--ink);
  overflow-wrap: anywhere;
  white-space: normal;
}

.detail-item-full {
  grid-column: 1 / -1;
  border-right: 0 !important;
}

.detail-download {
  justify-self: start;
  margin-top: 8px;
}

@media (max-width: 980px) {
  .form-hero-grid,
  .dashboard-hero-grid,
  .dashboard-toolbar {
    grid-template-columns: 1fr;
  }

  .dashboard-stats {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .form-hero,
  .dashboard-hero {
    padding: 66px 0 58px;
  }

  .form-section,
  .dashboard-section {
    padding: 46px 0 72px;
  }

  .form-card,
  .success-panel,
  .auth-card {
    padding: 22px;
  }

  .field-grid,
  .option-grid,
  .search-form,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .submit-panel,
  .detail-header {
    align-items: stretch;
    flex-direction: column;
  }

  .submit-panel .btn,
  .success-panel .btn,
  .search-form .btn,
  .dashboard-actions .btn {
    width: 100%;
  }

  .detail-item:nth-child(odd) {
    border-right: 0;
  }
}

@media (max-width: 460px) {
  .form-shell,
  .dashboard-shell {
    width: min(100% - 28px, 1120px);
  }

  .choice,
  .agreement {
    padding: 12px;
  }

  .form-card legend {
    font-size: 1.02rem;
  }
}
