:root {
  --bg: #f4f1e8;
  --panel: rgba(255, 252, 245, 0.88);
  --panel-border: rgba(63, 76, 52, 0.14);
  --text: #1d241b;
  --muted: #5f6958;
  --accent: #1d8b62;
  --accent-deep: #136347;
  --shadow: 0 24px 70px rgba(34, 48, 31, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(68, 162, 114, 0.16), transparent 35%),
    radial-gradient(circle at bottom right, rgba(242, 188, 83, 0.18), transparent 30%),
    var(--bg);
}

button,
input,
select {
  font: inherit;
}

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

.hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
  align-items: start;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  padding: 28px;
}

.eyebrow {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 12px;
  color: var(--accent-deep);
  font-weight: 700;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(40px, 5vw, 64px);
  line-height: 0.95;
  margin-bottom: 16px;
}

.lede,
.muted,
.status-message,
td,
th {
  color: var(--muted);
}

.auth-panel {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 8px;
}

input,
select {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(38, 61, 42, 0.16);
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.8);
}

button {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  background: linear-gradient(135deg, var(--accent), #3d9d73);
  color: white;
  font-weight: 700;
  cursor: pointer;
}

a.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 12px 18px;
  text-decoration: none;
  font-weight: 700;
}

button.secondary {
  background: #dcecdf;
  color: #1b4c36;
}

a.button-link.secondary {
  background: #dcecdf;
  color: #1b4c36;
}

button.ghost {
  background: transparent;
  color: var(--accent-deep);
  border: 1px solid rgba(29, 99, 71, 0.2);
}

.workspace {
  margin-top: 28px;
  display: grid;
  gap: 20px;
}

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

.workspace-actions {
  display: flex;
  gap: 12px;
  align-items: end;
}

.limit-picker {
  min-width: 88px;
}

.stats-grid,
.views-grid {
  display: grid;
  gap: 20px;
}

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

.views-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pseo-grid {
  grid-template-columns: minmax(360px, 0.9fr) minmax(0, 1.1fr);
}

.stat-card p {
  margin-bottom: 10px;
}

.stat-card strong {
  font-size: 36px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 14px 10px;
  border-bottom: 1px solid rgba(63, 76, 52, 0.1);
  vertical-align: top;
}

th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.person {
  display: grid;
  gap: 4px;
}

.primary-text {
  color: var(--text);
  font-weight: 600;
}

.chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(29, 139, 98, 0.1);
  color: var(--accent-deep);
  font-size: 12px;
  font-weight: 700;
}

.status-panel {
  color: var(--muted);
}

.status-panel--success {
  border-color: rgba(29, 139, 98, 0.28);
  color: var(--accent-deep);
}

.status-panel--error {
  border-color: rgba(155, 44, 44, 0.28);
  color: #9b2c2c;
}

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

.evidence-form button,
.wide-field {
  grid-column: 1 / -1;
}

.checkbox-field {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  gap: 10px;
}

.checkbox-field input {
  width: auto;
}

.inventory-list {
  display: grid;
  gap: 20px;
}

.stacked-list {
  display: grid;
  gap: 16px;
}

.inventory-section {
  display: grid;
  gap: 10px;
}

.inventory-section h4 {
  margin: 0;
}

.inventory-item {
  display: grid;
  gap: 3px;
  padding: 12px;
  border: 1px solid rgba(63, 76, 52, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.45);
}

.inventory-item span {
  color: var(--muted);
  font-size: 13px;
}

.hidden {
  display: none;
}

.empty-state {
  padding: 20px 0;
  color: var(--muted);
}

.background-glow {
  position: fixed;
  inset: auto;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  filter: blur(50px);
  opacity: 0.35;
  pointer-events: none;
}

.background-glow-a {
  top: 40px;
  right: 40px;
  background: rgba(29, 139, 98, 0.35);
}

.background-glow-b {
  bottom: 60px;
  left: 20px;
  background: rgba(242, 188, 83, 0.35);
}

.kids-shell {
  max-width: 1180px;
}

.kids-hero {
  min-height: 220px;
  display: grid;
  align-items: end;
  padding: 32px 0 24px;
}

.kids-hero h1 {
  max-width: 760px;
}

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

.kids-form,
.kids-admin-login,
.kids-setup-form {
  display: grid;
  gap: 14px;
}

.kids-admin-login {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
}

.kids-admin-login .status-message {
  grid-column: 1 / -1;
}

.kids-setup-form {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  margin-top: 16px;
}

.current-session {
  display: grid;
  gap: 4px;
  padding: 14px;
  margin-bottom: 14px;
  border: 1px solid rgba(29, 139, 98, 0.18);
  border-radius: 16px;
  background: rgba(29, 139, 98, 0.08);
}

.current-session span {
  color: var(--muted);
}

.admin-login-panel {
  margin-top: 20px;
}

@media (max-width: 960px) {
  .hero,
  .views-grid,
  .stats-grid,
  .kids-grid,
  .kids-admin-login {
    grid-template-columns: 1fr;
  }

  .workspace-header {
    display: grid;
  }

  .workspace-actions {
    flex-wrap: wrap;
  }

  .evidence-form {
    grid-template-columns: 1fr;
  }

  .kids-setup-form {
    grid-template-columns: 1fr;
  }
}
