/* ============================================================
   Anagrafica Bimbi (FASE 08) - layout moderno coerente
   con il design system Chronos.
   ============================================================ */

/* ========== Toolbar (search + filtri stato + add) ========== */
.children-toolbar {
    background: #ffffff;
    border: 1px solid #e3ece0;
    border-radius: 12px;
    padding: 12px 16px;
    box-shadow: 0 2px 6px rgba(69, 130, 58, 0.05);
}

/* Filtri stato a pillole (radio nascosti, label = pillola cliccabile) */
.children-status-filters {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.children-status-filters input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.children-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 14px;
    border-radius: 999px;
    background: #f3f4f6;
    color: #4b5563;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
    user-select: none;
    border: 1px solid transparent;
}
.children-status-pill .material-symbols-outlined {
    font-size: 1.05rem !important;
}
.children-status-pill:hover {
    background: var(--color-border);
    color: var(--color-text);
}
.children-status-filters input[type="radio"]:checked + .children-status-pill {
    background: linear-gradient(135deg, var(--theme-pink-d) 0%, var(--theme-pink-l) 100%);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 2px 4px rgba(194, 24, 91, 0.28);
}
.children-status-filters input[type="radio"]:focus-visible + .children-status-pill {
    outline: 2px solid var(--theme-pink-l);
    outline-offset: 2px;
}

/* Slot azioni toolbar (Nuovo bimbo + back-to-grid) */
.children-toolbar-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
}

/* Pulsante Nuovo bimbo - tema fucsia (sezione Bimbi) */
.btn-children-add {
    background: linear-gradient(135deg, var(--theme-pink-d) 0%, var(--theme-pink-l) 100%);
    border: none;
    color: #ffffff;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 8px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 2px 6px rgba(194, 24, 91, 0.22);
}
.btn-children-add:hover {
    background: linear-gradient(135deg, #a01548 0%, #d63870 100%);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(194, 24, 91, 0.32);
}
.btn-children-add .material-symbols-outlined {
    font-size: 1.15rem !important;
}

/* ========== Meta sopra alla tabella (badge totale) ========== */
.children-grid-meta {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 6px;
}
.children-count-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(194, 24, 91, 0.10);
    color: #8a1145;
    border: 1px solid rgba(194, 24, 91, 0.22);
    border-radius: 999px;
    padding: 4px 12px;
    font-weight: 700;
    font-family: TitilliumWeb-Bold, sans-serif;
}
.children-count-badge .material-symbols-outlined {
    font-size: 1.1rem !important;
    color: var(--theme-pink-d);
}
.children-count-label {
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.75rem;
    color: var(--color-text-muted);
    font-weight: 600;
}

/* ========== Riga bimbo ========== */
.children-container .row.record {
    border-radius: 8px;
    transition: background-color 0.15s ease, box-shadow 0.15s ease;
}
.children-container .row.record:hover {
    box-shadow: 0 4px 10px rgba(69, 130, 58, 0.10);
}

/* Avatar (iniziali) */
.children-name-cell {
    display: flex !important;
    align-items: center;
    gap: 12px;
}
.children-avatar {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--theme-pink-d) 0%, var(--theme-pink-l) 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: TitilliumWeb-Bold, sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.10);
}
.children-name-text {
    flex: 1 1 auto;
    min-width: 0;
}
.children-name-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 2px;
}
.children-tag {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 999px;
    line-height: 1.4;
}
.children-tag .material-symbols-outlined {
    font-size: 0.95rem !important;
}
.children-tag.tag-allergy {
    background: #fee2e2;
    color: #991b1b;
}
.children-tag.tag-birthday {
    background: linear-gradient(135deg, #fde68a 0%, #fbbf24 100%);
    color: #78350f;
}
.children-tag.tag-enrollment-pending {
    background: #fef3c7;
    color: #92400e;
}
.children-tag.tag-enrollment-rejected {
    background: #fee2e2;
    color: #991b1b;
}
.children-tag.tag-enrollment-withdrawn {
    background: #f3f4f6;
    color: #4b5563;
}

.children-text-muted {
    color: var(--color-text-muted);
}

.children-age-badge {
    display: inline-block;
    background: #f1f7ee;
    color: #2f4f29;
    font-weight: 600;
    padding: 1px 8px;
    border-radius: 6px;
    font-size: 0.85rem;
    border: 1px solid #d4e9d1;
}

/* Stato attivo / storico - centrato in cella 36x36 */
.children-active-on,
.children-active-off {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    line-height: 1;
}
.children-active-on .material-symbols-outlined {
    color: var(--color-brand-text);
    font-size: 1.4rem !important;
}
.children-active-off .material-symbols-outlined {
    color: #9ca3af;
    font-size: 1.4rem !important;
}

/* Link "storico accessi" - icon button 36x36 centrato */
.children-action-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: var(--color-brand-text);
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease;
    line-height: 1;
}
.children-action-link:hover {
    background-color: #d4e9d1;
    color: #1d5313;
}

/* Riga bambino storico (active=False) */
.children-container .row.record.is-inactive {
    opacity: 0.65;
    background-color: #fafbfc !important;
}
.children-container .row.record.is-inactive:hover {
    opacity: 1;
}

/* Riga compleanno: accent oro/giallo */
.children-container .row.record.is-birthday {
    background-color: #fffbeb !important;
    border-left: 3px solid #f59e0b;
}

/* Empty state */
.children-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #9ca3af;
    background: #fafbfc;
    border: 1px dashed #d1d5db;
    border-radius: 12px;
    margin-top: 20px;
}
.children-empty-state .material-symbols-outlined {
    font-size: 3.5rem !important;
    display: block;
    margin-bottom: 8px;
    opacity: 0.6;
}
