:root {
  --bg: #f4efe7;
  --bg-panel: rgba(255, 251, 245, 0.84);
  --card: rgba(255, 249, 240, 0.93);
  --text: #1d1b18;
  --muted: #5d574e;
  --accent: #b6512f;
  --accent-dark: #7d351d;
  --olive: #5d6b35;
  --border: rgba(61, 45, 28, 0.12);
  --shadow: 0 20px 50px rgba(66, 41, 18, 0.12);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Outfit", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(230, 159, 116, 0.35), transparent 34%),
    radial-gradient(circle at bottom right, rgba(126, 144, 77, 0.25), transparent 30%),
    linear-gradient(180deg, #f8f0e2 0%, #efe6d8 100%);
  min-height: 100vh;
}

body.auth-locked .page-shell {
  filter: blur(8px);
  pointer-events: none;
  user-select: none;
}

.auth-gate {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(29, 27, 24, 0.42);
  backdrop-filter: blur(10px);
  z-index: 20;
}

.auth-gate[hidden] {
  display: none;
}

.auth-gate-card {
  width: min(520px, 100%);
  padding: 32px;
  border-radius: var(--radius-xl);
  background: rgba(255, 249, 240, 0.96);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.page-shell {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 40px;
}

.hero,
.layout {
  display: grid;
  gap: 24px;
}

.hero {
  grid-template-columns: 1.5fr 0.9fr;
  align-items: stretch;
  margin-bottom: 24px;
}

.hero-copy,
.hero-panel,
.card {
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.hero-copy {
  background: linear-gradient(135deg, rgba(255, 246, 235, 0.94), rgba(249, 235, 215, 0.88));
  border-radius: var(--radius-xl);
  padding: 32px;
}

.hero-panel,
.card {
  background: var(--bg-panel);
  border-radius: var(--radius-xl);
  padding: 28px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent-dark);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.75rem;
  font-weight: 800;
}

h1,
h2,
h3,
.stat-card strong,
.highlight-card strong {
  font-family: "Space Grotesk", sans-serif;
}

h1 {
  margin: 0;
  font-size: clamp(2.4rem, 5vw, 4.4rem);
  line-height: 0.98;
  max-width: 12ch;
}

h2 {
  margin: 0;
  font-size: 1.7rem;
}

.hero-text,
.hero-panel ol,
.entry-meta,
.entry-card p,
.field span,
.checkbox-field span,
.group-value {
  color: var(--muted);
}

.hero-text {
  font-size: 1.05rem;
  line-height: 1.6;
  max-width: 64ch;
  margin: 18px 0 28px;
}

.hero-stats,
.highlights,
.field-grid,
.face-groups,
.entry-grid {
  display: grid;
  gap: 16px;
}

.hero-stats,
.highlights {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stat-card,
.highlight-card,
.reporting-panel {
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid rgba(91, 69, 48, 0.12);
  border-radius: var(--radius-lg);
  padding: 18px;
}

.stat-label,
.highlight-label,
.entry-label,
.group-title {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-dark);
  font-weight: 700;
}

.panel-badge {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(182, 81, 47, 0.12);
  color: var(--accent-dark);
  font-weight: 700;
  margin-bottom: 18px;
}

.hero-panel ol {
  margin: 18px 0 0;
  padding-left: 20px;
  line-height: 1.8;
}

.domain-copy,
.login-status {
  color: var(--muted);
  line-height: 1.6;
}

.login-form {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.login-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.login-status {
  margin: 0;
  font-size: 0.92rem;
}

.layout {
  grid-template-columns: 1fr 1.08fr;
}

.goals-card {
  grid-column: 1 / -1;
}

.goals-highlights {
  margin-top: 24px;
}

.section-heading,
.field-label-row,
.entry-topline,
.entry-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.checkin-form {
  margin-top: 22px;
}

.field-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 18px;
}

.field,
.compact-field {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.field span,
.compact-field span {
  font-size: 0.92rem;
  font-weight: 600;
}

.field input,
.field textarea,
.compact-field select {
  width: 100%;
  border: 1px solid rgba(90, 69, 50, 0.18);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  padding: 14px 16px;
  font: inherit;
  color: var(--text);
}

.field input:focus,
.field textarea:focus,
.compact-field select:focus {
  outline: 2px solid rgba(182, 81, 47, 0.22);
  border-color: var(--accent);
}

.field-wide {
  grid-column: span 2;
}

.face-groups {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 18px;
}

.face-group {
  border: 1px solid rgba(93, 87, 78, 0.14);
  border-radius: 22px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.38);
}

.faces {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.face-button {
  border: 1px solid rgba(88, 66, 44, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.8);
  padding: 12px 8px;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.face-button:hover,
.face-button:focus-visible {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 10px 20px rgba(101, 52, 29, 0.12);
}

.face-button.selected {
  border-color: var(--accent);
  background: rgba(182, 81, 47, 0.12);
}

.face-emoji {
  display: block;
  font-size: 1.45rem;
  margin-bottom: 8px;
}

.face-text {
  display: block;
  font-size: 0.84rem;
  color: var(--muted);
}

.check-row {
  margin-bottom: 22px;
}

.checkbox-field {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid rgba(90, 69, 50, 0.14);
}

.primary-button,
.secondary-button,
.delete-button {
  border: 0;
  border-radius: 999px;
  padding: 13px 18px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.primary-button {
  background: linear-gradient(135deg, var(--accent), #cf734a);
  color: white;
}

.secondary-button,
.delete-button {
  background: rgba(93, 87, 78, 0.1);
  color: var(--text);
}

.entries-list {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}

.reporting-panel {
  margin-top: 16px;
}

.reporting-summary,
.entry-reporting-text {
  margin: 8px 0 0;
  line-height: 1.6;
  color: var(--muted);
}

.entry-card {
  padding: 20px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(70, 58, 44, 0.12);
}

.entry-name {
  margin: 0 0 6px;
}

.entry-meta,
.entry-card p {
  margin: 0;
  line-height: 1.55;
}

.entry-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(93, 107, 53, 0.12);
  color: #39421f;
  font-weight: 700;
  font-size: 0.84rem;
}

.pill.alert {
  background: rgba(182, 81, 47, 0.14);
  color: var(--accent-dark);
}

.entry-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 16px 0;
}

.entry-reporting {
  padding-top: 14px;
  border-top: 1px solid rgba(70, 58, 44, 0.1);
}

.entry-recognition {
  font-weight: 600;
}

.empty-state {
  padding: 30px;
  text-align: center;
  border: 1px dashed rgba(93, 87, 78, 0.28);
  border-radius: 22px;
  color: var(--muted);
}

@media (max-width: 980px) {
  .hero,
  .layout,
  .hero-stats,
  .highlights,
  .face-groups {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100% - 20px, 1200px);
    padding-top: 16px;
  }

  .hero-copy,
  .hero-panel,
  .card {
    padding: 22px;
  }

  .field-grid,
  .entry-grid,
  .faces {
    grid-template-columns: 1fr;
  }

  .field-wide {
    grid-column: auto;
  }

  .section-heading,
  .field-label-row,
  .entry-topline,
  .entry-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}
