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

.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;
  overflow-wrap: anywhere;
}

.form-summary,
.dashboard-stats article {
  min-width: 0;
  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);
  overflow-wrap: anywhere;
}

.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 {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}

.form-card {
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.form-card legend {
  float: left;
  width: 100%;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(200, 230, 40, 0.16), rgba(255, 255, 255, 0)),
    var(--white);
  padding: 24px 30px 20px;
  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: 24px 22px;
  align-items: start;
}

.form-card > .field-grid,
.form-card > .agreement-list {
  clear: both;
  padding: 30px;
}

.field,
.login-form {
  display: grid;
  gap: 8px;
  min-width: 0;
  align-content: start;
}

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

.field > span,
.field > label,
.field-full > span,
.agreement span {
  display: flex;
  align-items: flex-end;
  min-height: 30px;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 900;
  line-height: 1.3;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 58px;
  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;
}

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

.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 input:disabled,
.field select:disabled,
.field textarea:disabled {
  background: #f0f6f1;
  color: rgba(0, 38, 35, 0.55);
  cursor: not-allowed;
}

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

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

.choice,
.agreement {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 64px;
  border: 1px solid rgba(15, 81, 50, 0.15);
  border-radius: var(--radius);
  background: #fbfffb;
  padding: 15px 16px;
  color: var(--ink);
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.choice:has(input:checked),
.agreement:has(input:checked) {
  border-color: var(--green-600);
  background: var(--green-100);
  box-shadow: 0 0 0 1px var(--green-600) inset;
}

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

.choice span,
.agreement span {
  min-height: 0;
  line-height: 1.35;
}

.field input[type="file"] {
  min-height: auto;
  padding: 10px;
  background: #fbfffb;
}

.field input[type="file"]::file-selector-button {
  margin-right: 12px;
  border: 0;
  border-radius: 999px;
  padding: 9px 18px;
  background: var(--green-700);
  color: var(--white);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s ease;
}

.field input[type="file"]::file-selector-button:hover {
  background: var(--green-900);
}

.retained-file {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(44, 163, 92, 0.26);
  border-radius: var(--radius);
  background: rgba(44, 163, 92, 0.08);
  padding: 12px 14px;
  color: var(--green-900);
}

.retained-file strong {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
}

.retained-file strong::before {
  content: "";
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background:
    linear-gradient(135deg, var(--lime), var(--green-600));
  box-shadow: 0 0 0 4px rgba(44, 163, 92, 0.1);
}

.retained-file strong::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 7px;
  width: 8px;
  height: 4px;
  border-left: 2px solid var(--green-900);
  border-bottom: 2px solid var(--green-900);
  transform: rotate(-45deg);
}

.retained-file span,
.retained-file small {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.field[hidden] {
  display: none;
}

.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;
  justify-items: center;
  gap: 20px;
  max-width: 760px;
  margin-inline: auto;
  padding: clamp(34px, 5vw, 58px);
  text-align: center;
}

.success-icon {
  position: relative;
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at 36% 28%, rgba(255, 255, 255, 0.42), transparent 36%),
    linear-gradient(135deg, var(--lime), var(--green-600));
  box-shadow:
    0 22px 42px rgba(44, 163, 92, 0.22),
    0 0 0 12px rgba(44, 163, 92, 0.1);
}

.success-icon::before {
  content: "";
  width: 34px;
  height: 18px;
  border-left: 6px solid var(--green-900);
  border-bottom: 6px solid var(--green-900);
  transform: translateY(-3px) rotate(-45deg);
}

.success-panel .eyebrow {
  margin: 6px 0 0;
  border-color: rgba(44, 163, 92, 0.2);
  background: rgba(44, 163, 92, 0.12);
  color: var(--green-700);
}

.success-panel .form-actions {
  width: min(100%, 560px);
  justify-content: center;
  margin-top: 8px;
}

.success-panel h2 {
  max-width: 640px;
  font-size: clamp(2rem, 4vw, 3.2rem);
}

.success-panel p {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.7;
}

.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;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 24px 0 16px;
  color: var(--muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.google-login-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 54px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.google-login-button:hover {
  transform: translateY(-2px);
  border-color: var(--green-600);
  box-shadow: 0 12px 26px rgba(4, 61, 51, 0.1);
}

.google-mark {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 1px solid #dadce0;
  border-radius: 50%;
  color: #4285f4;
  background: var(--white);
  font-family: Arial, sans-serif;
  font-size: 1rem;
  font-weight: 700;
}

.auth-note {
  margin: 14px 0 0 !important;
  text-align: center;
  font-size: 0.88rem !important;
}

.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-hero-grid,
  .dashboard-hero-grid {
    gap: 24px;
  }

  .form-hero h1,
  .dashboard-hero h1 {
    max-width: 100%;
    font-size: clamp(2rem, 10vw, 2.7rem);
    overflow-wrap: anywhere;
  }

  .form-summary,
  .dashboard-stats article {
    width: 100%;
    padding: 22px;
  }

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

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

  .form-card {
    padding: 0;
  }

  .form-card legend {
    padding: 20px 22px 18px;
  }

  .form-card > .field-grid,
  .form-card > .agreement-list {
    padding: 22px;
  }

  .field-grid,
  .location-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 {
    min-height: 58px;
    padding: 13px;
  }

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