:root {
  --bg: #eef6fb;
  --ink: #13212f;
  --muted: #4f5f73;
  --card: rgba(255, 255, 255, 0.82);
  --stroke: rgba(19, 33, 47, 0.12);
  --glow-a: #00d0ff;
  --glow-b: #ff8a00;
  --ok: #0f8a5f;
  --warn: #b03636;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", sans-serif;
  color: var(--ink);
  background: linear-gradient(130deg, #e9f7ff 0%, #fdf7ea 45%, #fff5f0 100%);
}

.bg-aurora {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(28rem 20rem at 18% 15%, rgba(0, 208, 255, 0.25), transparent 70%),
    radial-gradient(30rem 20rem at 90% 12%, rgba(255, 138, 0, 0.18), transparent 70%),
    radial-gradient(26rem 16rem at 50% 95%, rgba(255, 96, 145, 0.18), transparent 70%);
}

.page-shell {
  position: relative;
  width: min(1120px, 94vw);
  margin: 2.5rem auto;
}

.card {
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: 24px;
  backdrop-filter: blur(10px);
  box-shadow: 0 20px 60px rgba(12, 31, 52, 0.14);
  padding: 1.4rem;
  animation: rise 420ms ease-out;
}

@keyframes rise {
  from {
    transform: translateY(12px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.card-form {
  max-width: 720px;
  margin: 0 auto;
}

.card-center {
  max-width: 620px;
  margin: 10vh auto 0;
  text-align: center;
}

h1 {
  margin: 0.25rem 0 0.7rem;
  font-family: "Sora", sans-serif;
  font-size: clamp(1.7rem, 5vw, 2.5rem);
  letter-spacing: -0.03em;
}

.eyebrow {
  margin: 0;
  color: #215e91;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  font-size: 0.76rem;
}

.intro {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.form-grid {
  margin-top: 1.15rem;
  display: grid;
  gap: 0.9rem;
}

.form-grid.compact {
  max-width: 440px;
  margin-inline: auto;
}

label {
  display: grid;
  gap: 0.4rem;
  font-weight: 600;
}

input,
select {
  width: 100%;
  border: 1px solid rgba(19, 33, 47, 0.2);
  background: #fff;
  border-radius: 12px;
  font-size: 1rem;
  padding: 0.75rem 0.9rem;
  font-family: inherit;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--glow-a);
  box-shadow: 0 0 0 3px rgba(0, 208, 255, 0.18);
}

.checkbox-row {
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 0.65rem;
  font-weight: 500;
}

.checkbox-row input {
  width: 1.1rem;
  height: 1.1rem;
  margin-top: 0.2rem;
}

.link-button {
  border: 0;
  background: transparent;
  color: #006ca8;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
}

.btn-primary,
.btn-secondary,
.btn-ghost,
.btn-danger {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 0.68rem 1rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
}

.btn-primary {
  background: linear-gradient(90deg, #00a3d4, #00d0ff);
  color: #ffffff;
}

.btn-secondary {
  background: #ffffff;
  color: #10314f;
  border-color: rgba(16, 49, 79, 0.22);
}

.btn-ghost {
  background: transparent;
  color: #10314f;
  border-color: rgba(16, 49, 79, 0.22);
}

.btn-danger {
  background: #ffe6e5;
  color: #972f2f;
  border-color: #f3b8b6;
}

.flash-status {
  margin-bottom: 1rem;
  border-radius: 12px;
  background: #e6fff4;
  border: 1px solid #b6f0d1;
  color: var(--ok);
  padding: 0.75rem 0.9rem;
  font-weight: 600;
}

.error {
  color: var(--warn);
  font-size: 0.86rem;
  font-weight: 600;
}

.conditional-panel {
  display: grid;
  gap: 0.9rem;
  padding: 0.9rem;
  border: 1px solid rgba(16, 49, 79, 0.22);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.65);
}

.legal-card h2 {
  margin: 1.2rem 0 0.5rem;
  font-family: "Sora", sans-serif;
  font-size: 1.08rem;
}

.legal-card p {
  margin: 0;
  line-height: 1.55;
}

.legal-note {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.legal-note a {
  color: #006ca8;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 30;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 21, 35, 0.6);
}

.modal-content {
  position: relative;
  max-width: 680px;
  margin: 8vh auto 0;
  max-height: 80vh;
  overflow: auto;
  background: #ffffff;
  border-radius: 18px;
  padding: 1.2rem;
}

.modal-content h2 {
  margin-top: 0;
}

.modal-content p {
  line-height: 1.45;
}

.admin-shell {
  max-width: 1100px;
  margin: 0 auto;
}

.admin-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.admin-head.simple {
  margin-bottom: 0.6rem;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
}

.filter-grid {
  display: grid;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.filter-actions {
  display: flex;
  gap: 0.6rem;
  align-items: end;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--stroke);
  border-radius: 14px;
  background: #fff;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
}

th,
td {
  border-bottom: 1px solid #ebedf0;
  text-align: left;
  padding: 0.68rem;
  vertical-align: top;
}

th {
  background: #f5f8fb;
}

th a {
  color: #1d4f78;
  text-decoration: none;
}

.table-actions {
  display: flex;
  gap: 0.45rem;
}

.table-actions form {
  margin: 0;
}

.pagination-wrap {
  margin-top: 0.8rem;
}

.admin-login {
  margin-top: 12vh;
}

@media (max-width: 760px) {
  .page-shell {
    margin-top: 1.2rem;
    margin-bottom: 1.2rem;
  }

  .card {
    border-radius: 16px;
    padding: 1rem;
  }

  .admin-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .admin-actions {
    width: 100%;
  }

  .admin-actions > * {
    flex: 1 1 auto;
  }

  .filter-actions {
    flex-direction: column;
    align-items: stretch;
  }
}
