:root {
  --bg: #f5f7fb;
  --ink: #182033;
  --muted: #657084;
  --panel: #ffffff;
  --line: #d9e1ee;
  --blue: #2563eb;
  --green: #159957;
  --red: #dc3545;
  --amber: #f59e0b;
  --teal: #0f766e;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink); }
button, input, select, textarea { font: inherit; }
.shell { min-height: 100vh; display: grid; place-items: start center; padding: 18px; }
.panel { width: min(920px, 100%); min-width: 0; max-width: 100%; overflow-wrap: anywhere; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 20px; box-shadow: 0 20px 60px #18203314; }
.narrow { width: min(680px, 100%); }
.top { display: flex; justify-content: space-between; gap: 14px; align-items: start; margin-bottom: 18px; }
.brand { display: flex; align-items: center; gap: 12px; }
.mark { width: 44px; height: 44px; border-radius: 8px; display: grid; place-items: center; background: var(--teal); color: white; font-weight: 900; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(25px, 5vw, 38px); line-height: 1.05; margin-bottom: 8px; }
h2 { font-size: 21px; margin-bottom: 12px; }
h3 { font-size: 17px; margin-bottom: 8px; }
.muted { color: var(--muted); }
.grid { display: grid; gap: 12px; }
.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.full { grid-column: 1 / -1; }
label { display: grid; gap: 6px; font-weight: 800; }
input, select, textarea { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 12px; background: white; color: var(--ink); }
textarea { min-height: 92px; resize: vertical; }
.btn { border: 0; border-radius: 8px; min-height: 44px; padding: 11px 14px; background: #e8eef7; color: var(--ink); font-weight: 900; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn.primary { background: var(--blue); color: white; }
.btn.success { background: var(--green); color: white; }
.btn.danger { background: var(--red); color: white; }
.btn.small { min-height: 34px; padding: 7px 10px; font-size: 13px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.choice-group { display: grid; gap: 10px; }
.choice { border: 1px solid var(--line); border-radius: 8px; padding: 12px; background: #fbfdff; }
.choice strong { display: block; margin-bottom: 10px; }
.seg { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.seg label { position: relative; display: block; font-weight: 900; cursor: pointer; }
.seg input { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.seg span { display: grid; place-items: center; min-height: 44px; border-radius: 8px; border: 2px solid var(--line); font-weight: 900; background: white; }
.seg input:checked + span.yes { border-color: var(--green); background: #e8fff2; color: #0f6a39; }
.seg input:checked + span.no { border-color: var(--red); background: #fff0f0; color: #a51222; }
.legal { max-height: 280px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; padding: 14px; background: #fbfdff; line-height: 1.45; }
.legal p, .legal li { color: #38445a; }
.privacy-summary { border: 1px solid #b8d9d3; border-left: 5px solid var(--teal); border-radius: 10px; padding: 16px; background: #f0fbf8; }
.privacy-summary p:last-child { margin-bottom: 0; }
.legal-footer { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 14px; }
.legal-footer a, .legal-page a, .privacy-summary a { color: #204f91; font-weight: 750; }
.legal-page { line-height: 1.65; }
.legal-page h1 { margin-bottom: 18px; }
.legal-page h2 { margin-top: 24px; }
.legal-version { color: var(--muted); font-size: 14px; }
.signature-box { border: 1px solid var(--line); border-radius: 8px; background: white; overflow: hidden; }
canvas { display: block; width: 100%; height: 180px; touch-action: none; background: #fff; }
.notice { border-left: 5px solid var(--amber); background: #fff8e1; border-radius: 6px; padding: 12px; margin: 12px 0; }
.ok { border-left-color: var(--green); background: #eafff2; }
.error { color: var(--red); font-weight: 800; min-height: 24px; }
.hidden { display: none !important; }
.admin-layout { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.side { background: #121827; color: white; padding: 18px; }
.side .mark { background: var(--blue); }
.side button { width: 100%; margin: 4px 0; justify-content: flex-start; }
.workspace { padding: 20px; min-width: 0; }
.table { display: grid; gap: 8px; }
.row { display: grid; grid-template-columns: minmax(0, 1.2fr) .8fr .7fr auto; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 8px; background: white; padding: 12px; }
.row strong { display: block; }
.campaign-card { display: grid; gap: 10px; border: 1px solid var(--line); border-radius: 8px; background: white; padding: 12px; }
.campaign-card.highlight { border-color: var(--green); box-shadow: 0 0 0 3px #15995722; }
.campaign-main { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: start; }
.campaign-main strong, .link-box span { display: block; }
.campaign-meta { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; align-items: center; color: var(--muted); font-weight: 800; }
.link-box { display: grid; gap: 4px; padding: 10px; border-radius: 8px; background: #f8fafc; border: 1px solid var(--line); }
.link-box span { color: var(--muted); font-size: 12px; font-weight: 900; text-transform: uppercase; }
.link-box code { white-space: normal; overflow-wrap: anywhere; font-size: 13px; color: #1f3b72; }
.tag { display: inline-flex; border-radius: 999px; padding: 4px 8px; font-size: 12px; font-weight: 900; background: #edf2fb; color: #35415a; }
.qr-card { width: 210mm; min-height: 297mm; padding: 18mm; background: white; color: #111827; text-align: center; }
.qr-card h1 { font-size: 30pt; }
.qr-card img, .qr-card svg { width: 95mm; height: 95mm; margin: 10mm auto; }
.qr-url { font-size: 15pt; word-break: break-word; }
@media (max-width: 760px) {
  .shell { padding: 10px; }
  .panel { padding: 15px; }
  .two, .three, .admin-layout, .row, .campaign-main { grid-template-columns: 1fr; }
  .campaign-meta { justify-content: flex-start; }
  .top { display: block; }
  .side { position: static; }
}
@media print {
  body { background: white; }
  .no-print { display: none !important; }
  .qr-card { box-shadow: none; border: 0; margin: 0; }
}

/* School portal: keep the response table horizontally scrollable inside the page. */
.school-portal { grid-template-columns: minmax(0, 1fr); min-width: 0; }
.school-portal .panel { min-width: 0; max-width: 100%; }
.school-portal td, .school-portal th { padding: 8px; border-bottom: 1px solid var(--line); }
.school-portal input[readonly] { min-width: 0; }

/* Photo scolaire — palette commune, espaces clairement identifiés. */
:root { --bg:#f4f5fb; --ink:#24324c; --muted:#58677d; --line:#dce3ef; --blue:#3456b2; --teal:#087d80; --green:#157747; --red:#b72e43; --accent:#087d80; --tint:#eaf8f5; }
body { background:radial-gradient(ellipse at 100% 0,#e4e8fb,transparent 55%),radial-gradient(ellipse at 0 40%,#dff4f0,transparent 50%),var(--bg); line-height:1.5; }
body[data-space="admin"] { --accent:#6045a0; --tint:#f1edfb; }
body[data-space="school"] { --accent:#087d80; --tint:#eaf8f5; }
body[data-space="parent"] { --accent:#3456b2; --tint:#eef2ff; }
.shell { padding:32px 20px 48px; }
.panel { border-radius:22px; border-top:6px solid var(--accent); padding:28px; box-shadow:0 14px 45px #293b6410; }
.top { padding:4px 0 22px; border-bottom:1px solid var(--line); margin-bottom:24px; }
h1 { color:#1f3156; letter-spacing:-.035em; line-height:1.15; }
h2 { color:var(--accent); line-height:1.3; }
.mark { flex-shrink:0; width:50px; height:50px; background:linear-gradient(140deg,#3456b2,#087d80); border-radius:16px; box-shadow:0 5px 12px #087f8325; letter-spacing:-.04em; }
.space-label { display:block; color:var(--accent); font-size:11px; font-weight:850; letter-spacing:.14em; text-transform:uppercase; margin-bottom:9px; }
.intro-copy { max-width:660px; color:var(--muted); margin-bottom:22px; }
.btn { border:1px solid #d1dced; background:#f0f4fc; color:#294876; border-radius:12px; font-weight:750; transition:background .15s,box-shadow .15s; }
.btn:hover { background:#e3eafb; box-shadow:0 3px 9px #16395214; }
.btn.primary { background:var(--blue); border-color:var(--blue); color:#fff; }
.btn.primary:hover { background:#284493; }
.btn.success { background:var(--green); border-color:var(--green); color:#fff; }
.btn.danger { background:var(--red); border-color:var(--red); color:#fff; }
.btn:disabled { opacity:.6; cursor:wait; }
:focus-visible { outline:3px solid #b6600b; outline-offset:3px; }
.seg input:focus-visible + span { outline:3px solid #b6600b; outline-offset:3px; }
input,select,textarea { border-radius:11px; min-width:0; }
input:focus,select:focus,textarea:focus { border-color:var(--accent); box-shadow:0 0 0 3px var(--tint); }
input[type=checkbox] { accent-color:var(--accent); }
label small { font-weight:450; color:var(--muted); }
.class-warning { display:block; color:#b42318!important; font-size:1rem; line-height:1.35; font-weight:900!important; text-transform:uppercase; margin-top:4px; }
.family-summary:not(:empty) { border:2px solid #3456b2; background:#eef4ff; color:#203f78; border-radius:12px; padding:14px; font-weight:800; }
.side { background:linear-gradient(165deg,#243458,#423568); padding:26px 18px; }
.side .brand { margin-bottom:26px; }.side .mark { background:#ffffff20; box-shadow:none; }
.side .muted { color:#d5dced; }
.side .btn { background:#ffffff0d; border-color:#ffffff26; color:#fff; min-height:47px; }
.side .btn:hover { background:#ffffff25; }
.side .btn.primary { background:#fff; color:#423568; }
.side .btn.danger { background:transparent; color:#ffcad2; }
.workspace { padding:28px; }.workspace > .panel { width:min(1200px,100%); }
.workspace > .panel:first-child > .grid { background:#f5f3fb; border:1px solid #e8e2f3; border-radius:16px; padding:18px; }
#listStatus { font-weight:700; margin:20px 0 8px; color:#6045a0; }
.campaign-card { border-radius:16px; border-left:5px solid #087d80; box-shadow:0 4px 15px #16395207; padding:18px; }
.campaign-card:nth-child(3n+2) { border-left-color:#6650a8; }.campaign-card:nth-child(3n) { border-left-color:#c06b38; }
.campaign-card.highlight { border-color:var(--green); }
.campaign-main strong { font-size:1.08rem; color:#223653; }
.campaign-meta .tag,.tag { background:#e8ecfa; color:#384f89; }
.link-box { background:#f4f7fc; border-radius:12px; }
.school-access { background:#f0ebfa; color:#5a4091; border-color:#dbd0ef; }
.choice { background:#f0f8f5; border-color:#c0dfd4; padding:17px; border-radius:14px; }
.legal { background:#f5f7fc; border-radius:14px; }
body[data-space="parent"] #consentForm .legal { max-height:none; overflow:visible; }
.parent-language-bar { display:flex; align-items:center; justify-content:flex-start; gap:12px; margin:0 0 18px; }
.parent-language-bar label { display:flex; align-items:center; gap:7px; color:var(--muted); font-weight:750; }
.parent-language-bar select { width:auto; min-width:190px; padding:9px 38px 9px 12px; border-radius:999px; }
.notice { background:#fff6e8; border-left-color:#bb7119; color:#624913; border-radius:12px; }
.notice.ok { background:#eaf7ef; border-left-color:var(--green); color:#205839; }
.school-portal #schoolMaterials .notice { background:#f0faf8; border:1px solid #c8e5de; border-left:5px solid #087d80; color:var(--ink); border-radius:16px; padding:20px; margin:18px 0; }
.school-portal #schoolMaterials .notice > strong { display:block; font-size:1.12rem; color:#075e61; }
.school-portal #schoolCounts { background:#f0edfb; border-left-color:#6650a8; color:#493977; }
.school-portal #pupilVisibleCount { background:#edf3fc; border-left-color:#3456b2; color:#294876; }
.school-portal h2 { margin-top:28px; }
.school-portal th { background:#edf4f8; color:#234e6a; text-align:left; }
.school-portal tr:nth-child(even) td { background:#f6fafc; }
#schoolMaterials label { margin-top:14px; font-size:.9rem; }
#consentForm { gap:22px; }#consentForm > .grid.two { padding:20px; border:1px solid #dce4f5; background:#f5f7fe; border-radius:16px; }
#consentForm .siblings-guidance { background:#fff6ed; border-color:#efd9c6; border-left-color:#bf7439; }
#consentForm .siblings-guidance h2 { color:#895025; }
#consentForm .signature-box { border:2px dashed #9daed4; border-radius:14px; }
#consentForm .signature-box::before { content:"Votre signature"; display:block; padding:10px 14px; background:#f0f4fc; color:#345078; font-size:.85rem; font-weight:650; }
#consentForm .btn.success { min-height:48px; padding-inline:22px; }
dialog { max-width:calc(100vw - 28px); border:1px solid var(--line)!important; border-top:5px solid var(--accent)!important; border-radius:20px!important; color:var(--ink); box-shadow:0 24px 80px #10283c44; }
dialog::backdrop { background:#19244199; }
@media(max-width:760px) { .shell { padding:14px 10px 28px; }.workspace { padding:12px; }.panel { padding:18px; border-radius:17px; }.campaign-card { padding:14px; }.brand { min-width:0; }.side { padding:20px 16px; }.side .brand { margin-bottom:16px; }.top { padding-bottom:18px; }.top > .btn { margin-top:12px; }#consentForm > .grid.two { padding:15px; }.school-portal #schoolMaterials .notice { padding:15px; }h1 { font-size:28px; } }
@media(prefers-reduced-motion:reduce) { .btn { transition:none; } }
@media print { body { background:#fff; }.panel { box-shadow:none; border:0; } }

label:has(> input[type="checkbox"]) { display:flex; align-items:flex-start; gap:12px; line-height:1.45; }
label > input[type="checkbox"] { width:20px; height:20px; flex:0 0 20px; margin:2px 0 0; padding:0; }

/* School pupil files: preserve each guardian's original response. */
.pupil-card{margin:18px 0;padding:20px;border:1px solid #cbdde5;border-radius:16px;background:#fff;box-shadow:0 4px 16px #13354b09;overflow-wrap:anywhere}
.pupil-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;border-bottom:1px solid #e2edf1;margin-bottom:14px}
.pupil-heading h3{margin:0;color:#143b56}.pupil-heading p{margin:8px 0 14px}
.pupil-parents{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr));gap:14px}
.parent-response{min-width:0;background:#f4f8fa;border:1px solid #deeaef;border-radius:12px;padding:16px}.parent-response h4{margin:0 0 8px}.parent-response h4 span{display:block;font-size:.85rem;font-weight:400;margin-top:4px}
.consent-choice{font-weight:800}.consent-yes{color:#137333}.consent-no{color:#b42318}
.pupil-conflict{color:#9b1c13;background:#fff0ee;border-left:4px solid #b42318;padding:12px;border-radius:6px}
@media(max-width:600px){.pupil-card{padding:14px}.pupil-heading{flex-wrap:wrap}}

.pupil-table{width:100%;border-collapse:collapse;text-align:left;font-size:.9rem}
.school-portal .pupil-table th,.school-portal .pupil-table td{padding:9px 10px;border-bottom:1px solid #e1e9ee}
.pupil-table th{background:#edf5f8;color:#163c52}.pupil-table tr[data-pupil-index]{cursor:pointer}.pupil-table tr[data-pupil-index]:hover{background:#eff8fa}
.pupil-open{border:0;background:none;color:#164b6a;font:inherit;font-weight:650;text-align:left;padding:2px 0;cursor:pointer;text-decoration:underline;text-underline-offset:3px}
.pupil-alert{display:block;color:#b42318;font-size:.75rem;font-weight:600}
#pupilDialog{width:min(760px,calc(100% - 24px));max-height:85dvh;overflow:auto;border:1px solid #cbdde5;border-radius:16px;padding:16px;box-sizing:border-box}
#pupilDialog::backdrop{background:#102f4b99}#pupilDialog .pupil-card{margin:8px 0 0;box-shadow:none;border:0;padding:6px}
.pupil-dialog-toolbar{display:flex;justify-content:flex-end;position:sticky;top:0;background:white;z-index:1}
@media(max-width:600px){.school-portal .pupil-table th,.school-portal .pupil-table td{padding:8px 5px;font-size:.8rem}#pupilDialog{padding:12px}}

#editSiblings:disabled { background:#e5e7eb; color:#555; border-color:#cbd5e1; cursor:not-allowed; opacity:1; }

/* Prominent, calm sibling instructions above the declaration button. */
.siblings-guidance { background:#edf6fc; color:#173e59; border:1px solid #bdd7e8; border-left:5px solid #267ca5; border-radius:12px; padding:18px 20px; margin-bottom:14px; line-height:1.6; font-size:1.05rem; }
.siblings-guidance h2 { margin:0 0 10px; font-size:1.2rem; line-height:1.35; color:#123c57; }
.siblings-guidance p { margin:8px 0 0; }
.siblings-guidance strong { font-weight:800; }
@media(max-width:600px) { .siblings-guidance { padding:15px; } }

/* Préparation des fratries : une famille par carte, classes toujours visibles. */
.sibling-quick { background:#fff2e7; border-color:#ecd2b9; color:#874b21; }
.sibling-quick:hover { background:#fbe5d1; }
.class-shooting-quick { background:#e9f5ff; border-color:#bfdcf2; color:#16577e; }
.class-shooting-quick:hover { background:#dcefff; }
#classShootingDialog{width:760px;max-width:95vw;max-height:90vh;overflow:auto;padding:26px}
.class-shooting-date{display:block;max-width:280px;margin:12px 0}.class-shooting-table-wrap{overflow-x:auto}
.class-shooting-table{width:100%;border-collapse:collapse}.class-shooting-table th,.class-shooting-table td{padding:12px;border-bottom:1px solid #dbe6ed;text-align:center}.class-shooting-table th:first-child{text-align:left}.class-shooting-table thead th{background:#edf6fc;color:#173e59}.class-shooting-table label{display:inline-flex;align-items:center;gap:8px;font-weight:900;cursor:pointer}.class-shooting-table input{width:24px;height:24px;accent-color:#167557}
@media(max-width:600px){#classShootingDialog{padding:16px}.class-shooting-table th,.class-shooting-table td{padding:10px 7px}.class-shooting-table label span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}}
#siblingsAdminDialog { padding:26px; }
#siblingCount { background:#eee9fa; color:#563d85; border-radius:12px; padding:14px; font-weight:750; }
.sibling-report-filters { grid-template-columns:repeat(4,minmax(0,1fr)); }
.family-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,340px),1fr)); gap:16px; }
.family-card { border:1px solid #dce3ef; border-top:4px solid #73509c; border-radius:15px; background:white; overflow:hidden; }
.family-card header { padding:18px 18px 0;display:flex;justify-content:space-between;gap:12px;align-items:flex-start }.family-card h3 { margin:0 0 6px; }.family-card header p { color:var(--muted); font-size:.9rem; }
.family-children { list-style:none; margin:0; padding:0 18px; }.family-children li { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 0; border-top:1px solid #e6edf3; }
.family-children strong { overflow-wrap:anywhere; }.family-children small { display:block; color:var(--muted); margin-top:3px; }
.class-badge { border-radius:9px; background:#e5f4f0; color:#076761; font-size:.88rem; font-weight:800; padding:6px 9px; overflow-wrap:anywhere; }
.family-class-label{display:grid;gap:3px;color:#52606d;font-size:.75rem;font-weight:800;min-width:112px}.family-class-input{width:112px;max-width:34vw;padding:8px;border:1px solid #8cc8b8;border-radius:8px;background:#f0faf7;color:#075e55;font-weight:850;text-transform:uppercase}.family-class-actions{display:flex;align-items:center;gap:10px;padding:0 18px 14px}.family-class-save{background:#167557;border-color:#167557;color:#fff}.family-save-status{font-size:.85rem;font-weight:750;color:#16634d}
.family-card footer { background:#f5f3fb; padding:12px 18px; font-size:.85rem; color:#5b5271;display:grid;gap:9px }
.family-workflow-actions{display:flex;align-items:center;gap:16px;flex-wrap:wrap}.family-done-toggle,.family-absent-toggle{display:flex;align-items:center;gap:8px;width:max-content;max-width:100%;font-size:1rem;cursor:pointer}.family-done-toggle{color:#315847}.family-absent-toggle{color:#8a4b10}.family-done-toggle input,.family-absent-toggle input{width:22px;height:22px}.family-done-toggle input{accent-color:#167557}.family-absent-toggle input{accent-color:#c56616}.family-done{border-top-color:#167557;background:#f9fdfa}.family-absent{border-top-color:#c56616;background:#fffaf5}.family-done-badge,.family-absent-badge{border-radius:999px;padding:6px 10px;font-size:.78rem;font-weight:900;white-space:nowrap}.family-done-badge{background:#dff3e9;color:#166047}.family-absent-badge{background:#ffead7;color:#8a4b10}
.empty-families { background:#f5f7fc; border:1px dashed #c7d2e5; border-radius:14px; padding:24px; }
@media(max-width:760px){.sibling-report-filters{grid-template-columns:1fr 1fr}}
@media(max-width:600px){#siblingsAdminDialog{padding:16px}.sibling-report-filters{grid-template-columns:1fr}.family-children li{gap:8px}.class-badge{max-width:42%}.family-class-input{width:100px;max-width:38vw}.family-class-actions{align-items:flex-start;flex-direction:column}}

/* Secondary legal document: accessible without competing with school actions. */
.school-legal-link { color:#64748b; font-size:12px; font-weight:400; text-align:center; padding:5px 8px; text-decoration:underline; text-underline-offset:3px; align-self:center; }
.school-legal-link:hover { color:#334155; }
.school-legal-link:focus-visible { outline:2px solid #64748b; outline-offset:3px; border-radius:3px; }

/* School actions grouped by purpose, not only by color. */
#schoolSiblingReport,.btn.sibling-report {background:#7251a2;border-color:#7251a2;color:#fff;}
.school-portal .school-action-guide {background:#3157b7;border-color:#3157b7;color:#fff;}
.school-portal .school-action-guide:hover {background:#27499c;}
.school-portal .school-action-explainer {background:#73509c;border-color:#73509c;color:#fff;}
.school-portal .school-action-explainer:hover {background:#604184;}
.school-portal .school-action-cut {background:#087c79;border-color:#087c79;color:#fff;}
.school-portal .school-action-cut:hover {background:#066865;}
.school-portal .school-action-poster {background:#b45309;border-color:#b45309;color:#fff;}
.school-portal .school-action-poster:hover {background:#92400e;}
.school-portal a[href*="archive.zip"] {background:#087c79;border-color:#087c79;color:#fff;}
#schoolRefresh,#schoolLogout {background:#f1f3f6;border-color:#ccd2dc;color:#475569;}
.sibling-check {display:inline-block;border-radius:8px;padding:3px 10px;background:#eee5fa;color:#634095;font-weight:900;}
.class-editor {padding:16px;border:1px solid #c9e4db;background:#f0faf5;border-radius:12px;margin:16px 0;}
.class-editor input {max-width:260px;}
.class-editor .class-save {background:#167557;border-color:#167557;color:white;margin-top:10px;}
.school-class-manager {margin:26px 0;padding:20px;border:1px solid #c8e5de;border-left:5px solid #087d80;border-radius:16px;background:#f0faf8;}
.school-class-manager h2 {margin-top:0;}.class-add-label{min-width:min(100%,260px)}
.class-list{display:flex;flex-wrap:wrap;gap:9px;margin-top:16px}.class-item{display:inline-flex;align-items:center;gap:8px;border-radius:999px;padding:7px 8px 7px 13px;background:#dff3ee;color:#075e61}.class-remove{border:0;border-radius:999px;background:#fff;color:#9b1c13;padding:5px 9px;font-weight:800;cursor:pointer}
.pupil-heading {background:#f0eafa;padding:16px;border-radius:12px;border-left:5px solid #8055ac;}
.parent-response:nth-child(odd) {background:#eef8f7;border-left:4px solid #16827e;}
.parent-response:nth-child(even) {background:#fff5ea;border-left:4px solid #bc7b38;}
.family-card.family-incomplete {border-top:4px solid #c78027;}
.family-children .child-missing {background:#fff2df;border-left:4px solid #c78027;}
.family-children .child-missing small {color:#87500c;font-weight:700;}
.family-children .child-received small {color:#246951;}

/* Recoverable consent archiving: destructive intent, preserved evidence. */
.consent-delete-zone{margin-top:16px;padding-top:14px;border-top:1px solid #efd1cf}
.delete-warning{color:#b42318;font-weight:850;line-height:1.4}
.consent-delete-zone .btn.danger,.consent-delete-final{background:#b42318;border-color:#b42318;color:#fff}
.consent-delete-zone .btn.danger:hover,.consent-delete-final:hover{background:#8f1c13}
#consentDeleteDialog{width:min(620px,calc(100% - 24px));padding:24px}
#consentDeleteDialog textarea{min-height:90px;resize:vertical}
.confirm-delete{margin:18px 0;padding:14px;border:1px solid #efb5b0;border-radius:12px;background:#fff5f4;color:#7f1d1d;font-weight:750}
.consent-delete-final:disabled{background:#d6a6a2;border-color:#d6a6a2;cursor:not-allowed}
.school-consent-archive{margin-top:30px;padding:18px;border:1px solid #d8dce8;border-left:5px solid #6b7280;border-radius:16px;background:#f8f9fc}
.school-consent-archive>summary{cursor:pointer;font-size:1.15rem;font-weight:850;color:#354052}
.consent-archive-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,320px),1fr));gap:14px;margin-top:16px}
.consent-archive-card{border:1px solid #d9dde7;border-radius:14px;background:#fff;padding:16px;overflow-wrap:anywhere}
.consent-archive-card header{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;border-bottom:1px solid #e8eaf0;padding-bottom:10px}
.consent-archive-card header strong,.consent-archive-card header span{display:block}
.consent-archive-card header div>span{color:var(--muted);margin-top:4px}
.archive-badge{background:#eeeef2;color:#4b5563;border-radius:999px;padding:5px 9px;font-size:.78rem;font-weight:800;white-space:nowrap}
.consent-archive-card .consent-restore{background:#166b52;border-color:#166b52;color:#fff}
.consent-history{padding-left:22px}.consent-history li{margin:10px 0;padding-left:5px}.consent-history span{color:var(--muted)}
#adminConsentArchiveDialog{width:min(1000px,calc(100% - 24px));max-height:90dvh;overflow:auto;padding:24px}
.archive-dialog-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;position:sticky;top:-24px;background:#fff;padding:20px 0 12px;z-index:2}
@media(max-width:600px){#consentDeleteDialog,#adminConsentArchiveDialog{padding:16px}.archive-dialog-head{top:-16px}.consent-archive-card header{flex-wrap:wrap}}
