:root {
  --bg: #fff8dd;
  --card: rgba(255, 255, 255, 0.82);
  --card-strong: rgba(255, 255, 255, 0.9);
  --text: #2f2418;
  --muted: #6f5d46;
  --primary: #ff9f1c;
  --primary-dark: #d97d00;
  --secondary: #ffcf33;
  --outline: rgba(93, 66, 27, 0.15);
  --success: #1f9d55;
  --error: #d64545;
  --shadow: 0 24px 60px rgba(132, 98, 24, 0.16);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 219, 79, 0.85), transparent 35%),
    radial-gradient(circle at center right, rgba(255, 184, 71, 0.6), transparent 25%),
    radial-gradient(circle at bottom left, rgba(255, 210, 51, 0.55), transparent 24%),
    linear-gradient(135deg, #fffdf3 0%, #fff5c0 48%, #ffe49d 100%);
}

body::before,
body::after {
  content: "";
  position: fixed;
  border-radius: 50%;
  z-index: -1;
  opacity: 0.2;
}

body::before {
  width: 340px;
  height: 340px;
  background: #fff;
  top: -120px;
  right: -60px;
}

body::after {
  width: 260px;
  height: 260px;
  background: #ffcf33;
  bottom: -80px;
  left: -40px;
}

.layout,
.admin-layout {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 56px;
}

.layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
  align-items: center;
}

.hero-card,
.form-card,
.admin-login-card,
.admin-header,
.admin-controls-wrap,
.stats-grid article,
.table-card {
  background: var(--card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--outline);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.hero-card,
.form-card,
.admin-login-card,
.table-card,
.admin-header,
.admin-controls-wrap {
  padding: 28px;
}

.brand-pill,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: 999px;
  padding: 8px 14px;
  background: rgba(255, 207, 51, 0.34);
  color: #6d4d00;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.8rem;
}

.brand-pill::before,
.eyebrow::before {
  content: ":)";
  font-weight: 800;
}

.hero-card h1,
.admin-login-card h1,
.admin-header h1,
.form-card h2,
.table-head h2 {
  font-family: "Baloo 2", cursive;
  margin: 14px 0 12px;
  line-height: 0.95;
}

.hero-card h1 {
  font-size: clamp(3rem, 7vw, 5.8rem);
  max-width: 9ch;
}

.hero-copy,
.form-intro,
.admin-header p,
.hero-highlights p,
.table-head p,
.admin-login-copy {
  color: var(--muted);
  line-height: 1.7;
}

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

.hero-highlights article {
  padding: 18px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(93, 66, 27, 0.1);
  border-radius: 22px;
  transform: translateY(16px);
  opacity: 0;
  animation: floatUp 0.7s ease forwards;
}

.hero-highlights article:nth-child(2) {
  animation-delay: 0.12s;
}

.hero-highlights article:nth-child(3) {
  animation-delay: 0.24s;
}

.hero-highlights span {
  font-size: 2rem;
}

.hero-highlights h2 {
  margin: 10px 0 8px;
  font-family: "Baloo 2", cursive;
  font-size: 1.5rem;
}

.hero-highlights a,
.secondary-link {
  color: #8a5200;
  font-weight: 700;
  text-decoration-thickness: 2px;
}

.form-card {
  position: relative;
  overflow: hidden;
}

.form-card::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  right: -40px;
  top: -40px;
  background: radial-gradient(circle, rgba(255, 226, 84, 0.8), rgba(255, 226, 84, 0));
  pointer-events: none;
}

.smiley-badge {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: "Baloo 2", cursive;
  font-size: 2.2rem;
  background: linear-gradient(180deg, #ffe254 0%, #ffb933 100%);
  box-shadow: inset 0 -8px 12px rgba(0, 0, 0, 0.08);
}

.registration-form {
  display: grid;
  gap: 18px;
  margin-top: 20px;
}

.registration-form label,
.admin-controls label {
  display: grid;
  gap: 8px;
  font-weight: 700;
}

input,
button,
.button-link {
  font: inherit;
}

input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(93, 66, 27, 0.16);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

input:focus {
  border-color: rgba(255, 159, 28, 0.75);
  box-shadow: 0 0 0 5px rgba(255, 207, 51, 0.25);
  transform: translateY(-1px);
}

button,
.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 18px;
  padding: 15px 18px;
  font-weight: 800;
  cursor: pointer;
  color: #402800;
  background: linear-gradient(135deg, var(--secondary), var(--primary));
  box-shadow: 0 16px 24px rgba(255, 159, 28, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
}

button:hover,
.button-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 30px rgba(255, 159, 28, 0.3);
}

button:disabled {
  cursor: wait;
  opacity: 0.75;
}

.secondary-button {
  background: rgba(255, 255, 255, 0.88);
  color: #6d4d00;
  border: 1px solid rgba(93, 66, 27, 0.14);
  box-shadow: none;
}

.secondary-button:hover {
  box-shadow: none;
}

.button-link.secondary-button {
  color: #6d4d00;
}

.form-message {
  min-height: 24px;
  margin: 0 0 4px;
  font-weight: 700;
}

.form-message.success {
  color: var(--success);
}

.form-message.error {
  color: var(--error);
}

.admin-page .admin-layout {
  display: grid;
  gap: 22px;
}

.admin-login-card {
  width: min(520px, 100%);
  margin: 0 auto;
}

.admin-dashboard {
  display: grid;
  gap: 22px;
}

.admin-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
}

.admin-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-header h1 {
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  max-width: 12ch;
}

.admin-controls {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  align-items: end;
}

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

.stats-grid-four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stats-grid article {
  padding: 22px 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 248, 217, 0.85));
}

.stats-grid span {
  display: block;
  color: var(--muted);
  margin-bottom: 10px;
  font-weight: 700;
}

.stats-grid strong {
  font-family: "Baloo 2", cursive;
  font-size: 2.2rem;
}

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

.filter-chip {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 207, 51, 0.24);
  color: #7a5200;
  font-weight: 800;
}

.table-wrap {
  overflow: auto;
}

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

th,
td {
  text-align: left;
  padding: 14px 12px;
  border-bottom: 1px solid rgba(93, 66, 27, 0.1);
}

th {
  font-size: 0.92rem;
  color: #744b00;
}

tbody tr:hover {
  background: rgba(255, 223, 94, 0.18);
}

.helper-links {
  margin-top: 20px;
}

.admin-controls-wrap {
  padding-bottom: 22px;
}

.secondary-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

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

@media (max-width: 980px) {
  .layout {
    grid-template-columns: 1fr;
    padding-top: 20px;
  }

  .hero-highlights,
  .admin-controls,
  .stats-grid,
  .stats-grid-four {
    grid-template-columns: 1fr;
  }

  .admin-header,
  .table-head {
    flex-direction: column;
  }

  .admin-header-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }
}
