/* Панели взрослых: спокойный фирменный стиль, текст ≥16px, работает на телефоне. */
:root {
  --bg: #F7F2E9;
  --ink: #3A2E2A;
  --card: #fff;
  --accent: #6BAE23;
  --ok: #2E9E5B;
  --warn: #E3B505;
  --bad: #D64545;
  --line: #E7DCC9;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body { font-family: 'Nunito', system-ui, sans-serif; font-size: 16px; background: var(--bg); color: var(--ink); }

h1 { font-family: 'Fredoka', sans-serif; font-size: 26px; margin-bottom: 16px; }
h2 { font-family: 'Fredoka', sans-serif; font-size: 20px; margin-bottom: 10px; }

a { color: var(--accent); }

.topbar {
  background: var(--card);
  border-bottom: 2px solid var(--line);
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 10px 20px;
  flex-wrap: wrap;
}

.brand { font-family: 'Fredoka'; font-size: 20px; font-weight: 600; }

.topbar nav { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; }

.topbar nav a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 10px;
}

.topbar nav a.active, .topbar nav a:hover { background: #FBEEDD; color: var(--accent); }

.logout-form { display: flex; align-items: center; gap: 10px; }
.user-name { font-weight: 700; opacity: .7; }

.logout-form button {
  font: inherit;
  font-weight: 700;
  border: 2px solid var(--line);
  background: none;
  border-radius: 10px;
  padding: 6px 14px;
  cursor: pointer;
}

.container { max-width: 1100px; margin: 24px auto; padding: 0 16px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
}

.flash-ok, .flash-err {
  padding: 12px 18px;
  border-radius: 12px;
  font-weight: 800;
  margin-bottom: 16px;
}

.flash-ok { background: #DFF3E6; color: var(--ok); }
.flash-err { background: #FBE2E2; color: var(--bad); }

.muted { color: #8a7a6d; }

/* формы */
label { display: block; font-weight: 700; margin-bottom: 12px; }

input, select {
  display: block;
  width: 100%;
  font: inherit;
  padding: 10px 12px;
  margin-top: 4px;
  border: 2px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.btn-primary {
  font: inherit;
  font-weight: 800;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 12px 22px;
  cursor: pointer;
}

.btn-secondary {
  font: inherit;
  font-weight: 700;
  background: none;
  border: 2px solid var(--accent);
  color: var(--accent);
  border-radius: 12px;
  padding: 10px 18px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

.btn-danger {
  font: inherit;
  background: none;
  border: none;
  color: var(--bad);
  font-weight: 700;
  cursor: pointer;
}

.btn-full { width: 100%; }

/* вход */
.login-wrap { display: flex; justify-content: center; padding-top: 6vh; }
.login-card { width: 380px; text-align: center; }
.login-logo { font-size: 56px; }
.login-card form { text-align: left; margin-top: 18px; }

/* таблицы */
table { width: 100%; border-collapse: collapse; }

th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }

th { font-size: 14px; text-transform: uppercase; letter-spacing: .04em; color: #8a7a6d; }

/* карточки групп воспитателя */
.group-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }

.group-card h2 { display: flex; justify-content: space-between; align-items: center; }

.group-card .age-band { font-size: 14px; font-weight: 700; color: #8a7a6d; }

.group-card .stars-line { font-size: 20px; margin: 8px 0; }

.group-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

.btn-launch {
  font: inherit;
  font-weight: 800;
  font-size: 18px;
  background: var(--ok);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 14px 20px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

/* «светофоры» */
.bar { background: #EFE7D8; border-radius: 999px; height: 14px; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 999px; }
.bar .g { background: var(--ok); }
.bar .y { background: var(--warn); }
.bar .r { background: var(--bad); }

/* дашборд */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.stat .num { font-family: 'Fredoka'; font-size: 32px; color: var(--accent); }
.stat .lbl { font-size: 14px; font-weight: 700; color: #8a7a6d; }

.inline-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.inline-form label { flex: 1; min-width: 140px; margin-bottom: 0; }

/* сертификат и печать */
.certificate {
  text-align: center;
  border: 10px double var(--accent);
  border-radius: 20px;
  padding: 40px 30px;
  background: #FFFDF6;
}

.certificate .cert-star { font-size: 70px; }
.certificate h1 { font-size: 34px; margin: 10px 0; }
.certificate .cert-name { font-family: 'Fredoka'; font-size: 42px; color: var(--accent); margin: 16px 0; }
.certificate p { font-size: 18px; }
.certificate .cert-footer { margin-top: 28px; display: flex; justify-content: space-between; font-size: 15px; color: #8a7a6d; }

@media print {
  .topbar, .no-print, .flash-ok, .flash-err { display: none !important; }
  body { background: #fff; }
  .container { max-width: none; margin: 0; }
  .card { border: none; }
}
