.tr-children-page,
.tr-child-today,
.tr-child-simple-card {
    --tr-navy: #0B315F;
    --tr-red: #EF334F;
    --tr-green: #2E8B3C;
    --tr-muted: #64748B;
    --tr-border: #E2E8F0;
    width: min(calc(100% - 28px), 1180px);
    margin: clamp(32px, 5vw, 70px) auto;
    color: #10233F;
}

.tr-children-page *,
.tr-child-today *,
.tr-child-simple-card * { box-sizing: border-box; }

.tr-children-hero,
.tr-today-hero,
.tr-child-form-card,
.tr-child-card,
.tr-privacy-note,
.tr-child-switcher,
.tr-today-tip,
.tr-today-empty,
.tr-child-simple-card {
    border: 1px solid var(--tr-border);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 16px 42px rgba(11,49,95,.07);
}

.tr-children-hero,
.tr-today-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: clamp(28px, 5vw, 52px);
    background:
        radial-gradient(circle at 8% 88%, rgba(239,51,79,.11), transparent 24rem),
        linear-gradient(135deg, #fff, #f6f9fc);
}

.tr-children-hero span,
.tr-today-hero span,
.tr-child-form-heading span,
.tr-today-heading span {
    color: var(--tr-red);
    font-size: 13px;
    font-weight: 900;
}

.tr-children-hero h1,
.tr-today-hero h1 {
    margin: 8px 0;
    color: var(--tr-navy);
    font-size: clamp(34px, 5vw, 56px);
    line-height: 1.2;
}

.tr-children-hero p,
.tr-today-hero p { max-width: 760px; margin: 0; color: var(--tr-muted); }

.tr-children-hero > a,
.tr-today-hero > a {
    display: inline-flex;
    flex: 0 0 auto;
    min-height: 48px;
    align-items: center;
    padding: 10px 17px;
    border-radius: 12px;
    color: #fff !important;
    background: var(--tr-navy);
    font-weight: 900;
    text-decoration: none !important;
}

.tr-privacy-note {
    display: grid;
    gap: 3px;
    margin: 16px 0;
    padding: 16px 19px;
    color: #166534;
    border-color: #bbf7d0;
    background: #f0fdf4;
    box-shadow: none;
}

.tr-privacy-note span { color: inherit; opacity: .85; }
.tr-child-list { display: grid; gap: 14px; margin: 18px 0; }

.tr-child-card {
    display: grid;
    grid-template-columns: 82px minmax(0,1fr) 190px;
    gap: 18px;
    align-items: center;
    padding: 20px;
}

.tr-child-avatar {
    display: grid;
    width: 82px;
    height: 82px;
    overflow: hidden;
    place-items: center;
    border-radius: 24px;
    color: var(--tr-navy);
    background: radial-gradient(circle at 35% 25%, rgba(239,51,79,.16), transparent 45%), #eef4fa;
    font-size: 34px;
    font-weight: 900;
}

.tr-child-avatar img { width: 100%; height: 100%; object-fit: cover; }
.tr-child-title-row { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.tr-child-title-row h2 { margin: 0; color: var(--tr-navy); font-size: 23px; }
.tr-child-card-copy > p { margin: 4px 0 9px; color: var(--tr-muted); }

.tr-child-badge { padding: 4px 8px; border-radius: 999px; font-size: 11px; font-weight: 900; }
.tr-child-badge-default { color: #92400e; background: #fef3c7; }
.tr-child-badge-active { color: #166534; background: #dcfce7; }
.tr-child-badge-paused { color: #991b1b; background: #fee2e2; }

.tr-child-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tr-child-tags span { padding: 4px 8px; border-radius: 999px; color: var(--tr-navy); background: #eff6ff; font-size: 11px; font-weight: 800; }

.tr-child-actions { display: grid; gap: 6px; }
.tr-child-actions > a,
.tr-child-actions button {
    display: flex;
    width: 100%;
    min-height: 36px;
    align-items: center;
    justify-content: center;
    padding: 6px 9px;
    border: 1px solid var(--tr-border);
    border-radius: 9px;
    color: var(--tr-navy) !important;
    background: #fff;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none !important;
    cursor: pointer;
}
.tr-child-actions form:last-child button { color: #991b1b !important; }

.tr-child-form-card { margin-top: 20px; padding: clamp(22px,4vw,38px); }
.tr-child-form-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.tr-child-form-heading h2 { margin: 5px 0 0; color: var(--tr-navy); }
.tr-child-form-heading a { font-weight: 800; }

.tr-child-form { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.tr-child-form > label { display: grid; gap: 7px; }
.tr-child-form > label > span,
.tr-child-form legend { color: var(--tr-navy); font-size: 14px; font-weight: 900; }
.tr-child-form input:not([type="checkbox"]):not([type="file"]),
.tr-child-form select {
    width: 100%;
    min-height: 50px;
    margin: 0;
    padding: 10px 13px;
    border: 1px solid var(--tr-border);
    border-radius: 12px;
    background: #fff;
    font: inherit;
}
.tr-child-form small { color: var(--tr-muted); font-size: 12px; }
.tr-child-full { grid-column: 1 / -1; }
.tr-child-form fieldset { margin: 0; padding: 16px; border: 1px solid var(--tr-border); border-radius: 15px; }
.tr-child-form legend { padding: 0 8px; }
.tr-child-check-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 9px; }
.tr-child-check-grid label { display: flex; gap: 7px; align-items: center; min-height: 44px; padding: 9px; border-radius: 10px; background: #f8fafc; }
.tr-child-sensitive { background: #fffaf0; }
.tr-child-sensitive > p { margin: 0 0 12px; color: #92400e; font-size: 13px; }
.tr-child-consent,
.tr-child-toggle { display: flex !important; gap: 8px; align-items: flex-start; margin-top: 14px; padding: 12px; border-radius: 11px; background: #fff; }
.tr-child-upload { padding: 14px; border: 1px dashed #cbd5e1; border-radius: 14px; background: #f8fafc; }
.tr-child-form > button { grid-column: 1 / -1; min-height: 54px; border: 0; border-radius: 13px; color: #fff; background: var(--tr-navy); font: inherit; font-weight: 900; cursor: pointer; }

.tr-child-message,
.tr-form-preserved-notice { margin: 14px 0; padding: 14px 16px; border-radius: 12px; font-weight: 800; }
.tr-child-message-success { color: #166534; border: 1px solid #bbf7d0; background: #f0fdf4; }
.tr-child-message-error { color: #991b1b; border: 1px solid #fecaca; background: #fef2f2; }
.tr-form-preserved-notice { color: var(--tr-navy); border: 1px solid #bfdbfe; background: #eff6ff; }

.tr-child-switcher { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; padding: 10px; box-shadow: none; }
.tr-child-switcher a { display: grid; gap: 1px; min-width: 130px; padding: 9px 13px; border-radius: 11px; color: var(--tr-navy) !important; text-decoration: none !important; }
.tr-child-switcher a.is-active { color: #fff !important; background: var(--tr-navy); }
.tr-child-switcher small { color: inherit; opacity: .75; }

.tr-today-tip { display: flex; gap: 14px; align-items: center; padding: 18px 20px; color: #7c2d12; border-color: #fed7aa; background: #fff7ed; box-shadow: none; }
.tr-today-tip > span { font-size: 30px; }
.tr-today-tip strong { display: block; }
.tr-today-tip p { margin: 2px 0 0; }
.tr-today-section { margin-top: 34px; }
.tr-today-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.tr-today-heading h2 { margin: 5px 0 0; color: var(--tr-navy); font-size: clamp(27px,3vw,40px); }
.tr-today-heading > a { font-weight: 900; }
.tr-today-empty { display: grid; gap: 5px; padding: 34px; text-align: center; box-shadow: none; }
.tr-today-empty span { color: var(--tr-muted); }

.tr-child-simple-card { max-width: 650px; padding: 36px; text-align: center; }
.tr-child-simple-card h2 { margin-top: 0; color: var(--tr-navy); }
.tr-child-simple-card p { color: var(--tr-muted); }
.tr-child-simple-card a { display: inline-flex; min-height: 46px; align-items: center; padding: 9px 16px; border-radius: 11px; color: #fff !important; background: var(--tr-navy); font-weight: 900; text-decoration: none !important; }

@media (max-width: 900px) {
    .tr-child-card { grid-template-columns: 70px minmax(0,1fr); }
    .tr-child-actions { grid-column: 1 / -1; grid-template-columns: repeat(3,minmax(0,1fr)); }
    .tr-child-check-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 680px) {
    .tr-children-hero,
    .tr-today-hero { display: block; }
    .tr-children-hero > a,
    .tr-today-hero > a { margin-top: 18px; }
    .tr-child-form { grid-template-columns: 1fr; }
    .tr-child-full { grid-column: auto; }
    .tr-today-heading { display: block; }
    .tr-today-heading > a { display: inline-block; margin-top: 10px; }
}

@media (max-width: 500px) {
    .tr-child-card { grid-template-columns: 58px minmax(0,1fr); padding: 15px; }
    .tr-child-avatar { width: 58px; height: 58px; border-radius: 17px; font-size: 24px; }
    .tr-child-actions,
    .tr-child-check-grid { grid-template-columns: 1fr; }
    .tr-child-switcher { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
    .tr-child-switcher a { min-width: 0; }
}
