:root {
  --bg-cream: #f7f2ea;
  --bg-sun: #f4d7a5;
  --bg-peach: #efbb9a;
  --surface: #fffaf2;
  --surface-strong: #fff4e8;
  --ink: #2f241f;
  --ink-soft: #66544a;
  --accent: #c75a3a;
  --accent-strong: #a6492f;
  --border: #e7d3bf;
  --ok: #1f7a46;
  --error: #9a2d2d;
  --shadow: 0 22px 45px rgba(71, 43, 22, 0.16);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Manrope", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 8% 8%, color-mix(in srgb, var(--bg-sun) 58%, white) 0%, transparent 32%),
    radial-gradient(circle at 92% 78%, color-mix(in srgb, var(--bg-peach) 65%, white) 0%, transparent 40%),
    linear-gradient(150deg, var(--bg-cream), #faefe2 38%, #f8e8d9);
  display: flex;
  justify-content: center;
  padding: 28px 14px;
}

.shell {
  width: 100%;
  max-width: 760px;
}

.shell--wide {
  max-width: 1024px;
}

.shell--compact {
  max-width: 480px;
}

.card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(165deg, var(--surface), var(--surface-strong));
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.card::after {
  content: "";
  position: absolute;
  right: -34px;
  top: -44px;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(199, 90, 58, 0.17), transparent 68%);
  pointer-events: none;
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.hero-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.hero-copy {
  min-width: 0;
}

.mamma-photo {
  margin: 4px 0 0;
  width: clamp(108px, 20vw, 132px);
  aspect-ratio: 3 / 4;
  height: auto;
  border-radius: 20px;
  overflow: hidden;
  border: 2px solid #fff;
  box-shadow: 0 8px 24px rgba(90, 54, 34, 0.24);
  background: linear-gradient(150deg, #f4dbc4, #eec49f);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.mamma-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 26%;
  display: block;
}

.mamma-photo__fallback {
  display: none;
  font-family: "Playfair Display", "Times New Roman", serif;
  color: #855136;
  font-size: 1.4rem;
  font-weight: 700;
}

.mamma-photo--missing .mamma-photo__fallback {
  display: block;
}

.title {
  margin: 10px 0 8px;
  line-height: 1.18;
  font-size: clamp(1.75rem, 4.8vw, 2.5rem);
  font-family: "Playfair Display", "Times New Roman", serif;
}

.subtitle {
  margin: 0 0 20px;
  color: var(--ink-soft);
  font-size: 1rem;
}

.stack {
  display: grid;
  gap: 15px;
}

.field {
  border: 0;
  margin: 0;
  padding: 0;
}

.label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.95rem;
  font-weight: 700;
}

.input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font-size: 1rem;
  font-family: inherit;
  padding: 12px 14px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input--compact {
  max-width: 260px;
  padding: 9px 12px;
  font-size: 0.92rem;
}

.input--table {
  padding: 8px 10px;
  font-size: 0.88rem;
}

.input:focus {
  border-color: color-mix(in srgb, var(--accent) 65%, white);
  box-shadow: 0 0 0 3px rgba(199, 90, 58, 0.18);
}

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

.textarea--table {
  min-height: 72px;
}

.choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.choice {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 600;
}

.button {
  border: 0;
  border-radius: 999px;
  padding: 11px 18px;
  color: #fff;
  background: linear-gradient(160deg, var(--accent), var(--accent-strong));
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: transform 0.14s ease, filter 0.14s ease;
}

.button:hover {
  transform: translateY(-1px);
  filter: saturate(1.06);
}

.button:disabled {
  opacity: 0.7;
  cursor: wait;
}

.button--small {
  padding: 8px 12px;
  font-size: 0.82rem;
}

.button--tiny {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 10px;
  font-size: 1rem;
}

.button--ghost {
  background: #fff;
  color: var(--accent-strong);
  border: 1px solid color-mix(in srgb, var(--accent-strong) 40%, white);
}

.button--google {
  background: linear-gradient(160deg, #2f7cff, #1f5fd6);
  padding: 8px 13px;
  font-size: 0.84rem;
}

.thanks-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button--danger {
  background: linear-gradient(160deg, #b54038, #8f322c);
}

.icon-button {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  color: #5c4639;
  cursor: pointer;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon-button:hover {
  background: #fff8f0;
}

.icon-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.icon-button--danger {
  border-color: #e8beb7;
  color: #8f322c;
  background: #fff6f5;
}

.icon-button--danger:hover {
  background: #fdeceb;
}

.message {
  min-height: 1.4rem;
  margin: 8px 0 0;
  font-size: 0.95rem;
}

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

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

.hint {
  margin: 18px 0 0;
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.hint--admin {
  margin: 6px 0 0;
}

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

.admin-actions {
  margin: 16px 0 8px;
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.checkbox-inline {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.stats {
  margin-top: 14px;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.stat {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
}

.stat__label {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.84rem;
}

.stat__value {
  margin: 8px 0 0;
  font-size: 1.5rem;
  font-weight: 800;
}

.table-wrap {
  margin-top: 8px;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
}

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

.table th,
.table td {
  text-align: left;
  padding: 11px 12px;
  border-bottom: 1px solid #f0e2d3;
  font-size: 0.92rem;
  vertical-align: top;
}

.table th {
  background: #fdf3e7;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.row-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.count-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.count-value {
  min-width: 2ch;
  text-align: center;
  font-weight: 700;
}

.cell-text {
  white-space: pre-wrap;
  word-break: break-word;
}

.date-wrap {
  display: grid;
  gap: 3px;
}

.date-main {
  font-weight: 600;
}

.date-sub {
  color: var(--ink-soft);
  font-size: 0.76rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid #d8c4b0;
  color: #8b5d3f;
  background: #f8ecdf;
  padding: 4px 8px;
  font-size: 0.75rem;
  font-weight: 700;
}

.row-deleted {
  opacity: 0.72;
}

.attendance-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  border: 1px solid transparent;
}

.attendance-pill--presente {
  color: #1f6d3e;
  background: #e8f6ed;
  border-color: #b5e2c6;
}

.attendance-pill--assente {
  color: #8a2f2f;
  background: #fbecec;
  border-color: #f0c5c5;
}

@media (max-width: 700px) {
  body {
    padding: 16px 10px;
  }

  .card {
    border-radius: 18px;
    padding: 18px;
  }

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

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

  .admin-actions {
    align-items: stretch;
  }

  .mamma-photo {
    width: clamp(92px, 28vw, 112px);
    border-radius: 16px;
  }
}
