/* ============================================
   XPLOSION — Посещаемость
   ============================================ */

/* Карточка ребёнка (обёртка) */
.child-section {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--purple);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 14px;
}

.child-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--border);
}

.child-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), #8b5cf6);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 18px;
  flex-shrink: 0;
}

.child-info .cn {
  font-weight: 800;
  font-size: 15px;
  margin-bottom: 3px;
}

.child-info .cg {
  font-size: 11px;
  color: var(--text-2);
}

/* Сводка: посещено / без уваж. / средний балл */
.att-summary {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.att-stat {
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  text-align: center;
}

.att-stat .num {
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 4px;
}

.att-stat .lbl {
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  font-weight: 700;
}

.att-stat.good .num { color: var(--green); }
.att-stat.bad  .num { color: var(--red); }
.att-stat.gold .num { color: var(--gold-text); }

/* Таблица посещений */
.att-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.att-table th {
  text-align: left;
  padding: 8px 10px;
  font-size: 10px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 800;
  border-bottom: 1px solid var(--border);
}

.att-table td {
  padding: 10px;
  border-bottom: 1px solid var(--border);
  color: var(--text-2);
}

.att-table .date-cell {
  white-space: nowrap;
  font-family: monospace;
  font-size: 12px;
}

/* Статусы посещений */
.att-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
}

.att-status.was {
  background: rgba(74, 222, 128, .12);
  color: var(--green);
  border: 1px solid rgba(74, 222, 128, .35);
}

.att-status.miss-ok {
  background: rgba(251, 191, 36, .12);
  color: #d99a00;
  border: 1px solid rgba(251, 191, 36, .35);
}

.att-status.miss-bad {
  background: rgba(255, 77, 94, .12);
  color: var(--red);
  border: 1px solid rgba(255, 77, 94, .35);
}

/* Мобильная версия */
@media (max-width: 780px) {
  .att-summary {
    grid-template-columns: 1fr;
  }
  .att-table {
    font-size: 12px;
  }
  .att-table th,
  .att-table td {
    padding: 8px 6px;
  }
}