:root {
  --font-body: 'Manrope', sans-serif;
  --font-display: 'Sora', sans-serif;
  --bg: #f4f9ff;
  --bg-soft: #eaf4ff;
  --card: rgba(255, 255, 255, 0.9);
  --card-solid: #ffffff;
  --text: #102132;
  --muted: #607487;
  --line: #d7e5f0;
  --primary: #086f80;
  --primary-soft: #13a6a5;
  --accent: #ff8a34;
}

* {
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  background:
    radial-gradient(circle at 8% 10%, #d7f8ff 0, transparent 33%),
    radial-gradient(circle at 84% 20%, #e4ffe9 0, transparent 34%),
    radial-gradient(circle at 50% 100%, #ffeeda 0, transparent 30%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
.display-6 {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

main > * {
  animation: rise-in 0.45s ease both;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.3;
  pointer-events: none;
}

.bg-glow-a {
  width: 320px;
  height: 320px;
  background: #4cc9f0;
  top: -100px;
  right: -70px;
}

.bg-glow-b {
  width: 250px;
  height: 250px;
  background: #ffbd73;
  bottom: 30px;
  left: -70px;
}

.hero-card {
  border-radius: 1.35rem;
  background: linear-gradient(135deg, #066b84 0%, #0fb1a1 52%, #39bbef 100%);
  box-shadow: 0 28px 46px rgba(6, 93, 123, 0.24);
}

.hero-card--registration {
  position: relative;
  overflow: hidden;
}

.hero-card--registration::after {
  content: '';
  position: absolute;
  inset: auto -5% -60% auto;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.hero-tip-card {
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(2px);
  padding: 0.85rem 0.95rem;
  color: #ecfeff;
}

.hero-tip-card__label {
  font-size: 0.73rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  opacity: 0.9;
}

.hero-tip-card__text {
  font-size: 0.88rem;
  margin-top: 0.25rem;
  line-height: 1.35;
}

.shadow-soft {
  border-radius: 1rem;
  backdrop-filter: blur(12px);
  background: var(--card);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.registration-shell {
  border: 1px solid #e2edf4;
}

.registration-pane {
  border: 1px solid #d9e7f3;
  border-radius: 1rem;
  padding: 1rem;
  background: linear-gradient(180deg, #ffffff, #f9fcff);
}

.registration-tabs {
  gap: 0.45rem;
}

.registration-tabs .nav-link {
  border-radius: 0.8rem;
  border: 1px solid #d5e5f0;
  color: #355c77;
  background: #f4f9ff;
  font-weight: 600;
}

.registration-tabs .nav-link.active {
  background: linear-gradient(140deg, #dff6ff, #d8f9f2);
  border-color: #9ed5e3;
  color: #074b60;
}

.registration-urgency {
  border: 1px solid #d4e7f1;
  border-radius: 0.95rem;
  padding: 1rem;
  background: linear-gradient(145deg, rgba(4, 111, 124, 0.08), rgba(19, 166, 165, 0.06));
}

.registration-urgency__eyebrow {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #0a6078;
  font-weight: 700;
}

.registration-urgency__badge {
  font-size: 0.85rem;
  border: 1px solid #cce3ef;
  color: #0a4d66 !important;
}

.registration-urgency__phone {
  color: #015471;
  font-weight: 700;
  text-decoration: none;
}

.registration-urgency__phone:hover {
  text-decoration: underline;
}

.registration-urgency__progress {
  height: 0.8rem;
  border-radius: 999px;
  background: #e6f1f8;
}

.registration-urgency__bar {
  border-radius: 999px;
  background: linear-gradient(90deg, #0b7c82, #13a6a5);
}

.auth-panel {
  background: #f7fbff;
  border-color: #d8e7f3 !important;
}

.form-control,
.form-select {
  border-radius: 0.75rem;
  border: 1px solid #d1ddea;
  padding: 0.64rem 0.9rem;
  background: var(--card-solid);
}

.form-control:focus,
.form-select:focus {
  border-color: #79bfcd;
  box-shadow: 0 0 0 0.2rem rgba(9, 119, 140, 0.14);
}

.form-label {
  margin-bottom: 0.35rem;
  font-weight: 600;
  font-size: 0.9rem;
}

.form-text {
  color: #667f94;
}

.teen-form .form-label {
  font-size: 0.86rem;
  color: #294d66;
}

.dense-form .form-label {
  font-size: 0.82rem;
  margin-bottom: 0.25rem;
}

.dense-form .form-control,
.dense-form .form-select {
  padding: 0.52rem 0.72rem;
}

.btn {
  border-radius: 0.75rem;
  font-weight: 600;
  transition: transform 0.12s ease, box-shadow 0.15s ease;
}

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

.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
}

.btn-outline-primary {
  color: var(--primary);
  border-color: #87c4d0;
}

.btn-dark {
  background: #0f2236;
  border-color: #0f2236;
}

.panel-card {
  border: 1px solid #e0ecf5;
}

.dashboard-heading .h3 {
  letter-spacing: -0.03em;
}

.compact-table-wrap {
  overflow-x: auto;
  border: 1px solid #dce8f2;
  border-radius: 0.95rem;
  background: #ffffff;
}

.compact-data-table {
  margin-bottom: 0;
  font-size: 0.9rem;
}

.compact-data-table thead th {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #58728a;
  border-bottom: 1px solid #dbe8f2;
  background: #f7fbff;
  padding: 0.65rem 0.75rem;
  white-space: nowrap;
}

.compact-data-table tbody td {
  padding: 0.62rem 0.75rem;
  border-color: #e8f0f6;
}

.compact-data-table tbody tr:hover {
  background: #fbfeff;
}

.compact-data-table .badge {
  font-weight: 600;
}

.edit-sheet {
  border-color: #dce8f2 !important;
  background: linear-gradient(180deg, #ffffff, #f7fbff) !important;
}

.team-card {
  border: 1px solid #d6e5f0;
  border-radius: 1rem;
  background: linear-gradient(180deg, #ffffff, #f7fbff);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.team-card__head {
  padding: 1rem 1rem 0.9rem;
  border-bottom: 1px solid #e8eff5;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.9rem;
}

.team-card__section {
  padding: 0.85rem 1rem 0.95rem;
  border-bottom: 1px solid #edf2f7;
}

.team-card__section-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #58748c;
  margin-bottom: 0.6rem;
}

.team-card__foot {
  padding: 0.8rem 1rem 0.95rem;
}

.team-members-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.team-member-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.52rem 0.58rem;
  border: 1px solid #e8eff5;
  border-radius: 0.72rem;
  background: #fbfdff;
}

.team-member-row + .team-member-row {
  border-top: 1px solid #e8eff5;
}

.team-member-row__main {
  min-width: 0;
}

.team-member-row__actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.team-member-row--inactive {
  background: #fff1f1;
  border-color: #f6c9c9;
  border-radius: 0.65rem;
}

.team-status-danger {
  color: #b42318;
  font-size: 0.78rem;
  font-weight: 700;
  margin-top: 0.2rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.team-birthday-icon {
  margin-left: 0.2rem;
}

.team-inline-form .form-select,
.team-inline-form .btn {
  font-size: 0.82rem;
}

.team-action-btn {
  min-width: 1.9rem;
  padding: 0.22rem 0.45rem;
}

.team-replace-inline {
  margin-top: -0.15rem;
  margin-bottom: 0.3rem;
  padding: 0.5rem 0.55rem;
  border: 1px solid #dbe8f3;
  border-radius: 0.66rem;
  background: #f4f9ff;
}

.team-grid > [class*='col-'] {
  display: flex;
}

.alert {
  border-radius: 0.8rem;
}

.text-secondary {
  color: var(--muted) !important;
}

#flash-messages:empty {
  margin-bottom: 0 !important;
}

@media (max-width: 991px) {
  .compact-data-table thead {
    display: none;
  }

  .compact-data-table tbody tr {
    display: block;
    padding: 0.55rem 0.8rem;
    border-bottom: 1px solid #e7eff6;
  }

  .compact-data-table tbody tr:last-child {
    border-bottom: 0;
  }

  .compact-data-table tbody td {
    border: 0;
    padding: 0.32rem 0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.8rem;
  }

  .compact-data-table tbody td::before {
    content: attr(data-label);
    flex: 0 0 42%;
    max-width: 42%;
    color: #5b738a;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    font-weight: 700;
    padding-top: 0.1rem;
  }

  .compact-data-table tbody tr.edit-row {
    padding: 0;
    border-bottom: 0;
  }

  .compact-data-table tbody tr.edit-row td {
    display: block;
    padding: 0;
  }

  .compact-data-table tbody tr.edit-row td::before {
    content: none;
  }

  .compact-data-table tbody td[colspan] {
    display: block;
  }

  .compact-data-table tbody td[colspan]::before {
    content: none;
  }

  .team-member-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .team-member-row__actions {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 767px) {
  .hero-card {
    padding: 1.35rem !important;
  }

  .registration-pane {
    padding: 0.85rem;
  }

  .registration-tabs {
    width: 100%;
  }

  .registration-tabs .nav-item {
    flex: 1;
  }

  .registration-tabs .nav-link {
    width: 100%;
    font-size: 0.9rem;
  }
}
