/* Patient settings only. Titles/icons remain the primary way to distinguish sections. */
.mother-settings { min-width: 0; }
.mother-settings .settings-page-head { margin: 0 0 22px; }
.mother-settings .settings-page-head p { margin: 8px 0 0; line-height: 1.55; }
.mother-settings .settings-card {
  --settings-accent: #59677c; --settings-tint: #f0f3f7; --settings-border: #c7d1dd;
  border: 1px solid var(--settings-border); border-inline-start: 4px solid var(--settings-accent);
  border-radius: 14px; background: var(--surface); margin: 0 0 22px; min-width: 0;
  scroll-margin-top: 100px;
}
.mother-settings [data-settings-tone=rose] { --settings-accent: #96566c; --settings-tint: #faf0f4; --settings-border: #e4cad4; }
.mother-settings [data-settings-tone=teal] { --settings-accent: #27786e; --settings-tint: #edf7f4; --settings-border: #bfddd4; }
.mother-settings [data-settings-tone=violet] { --settings-accent: #765399; --settings-tint: #f5f0fb; --settings-border: #d8cae9; }
.mother-settings [data-settings-tone=blue] { --settings-accent: #3b6d9c; --settings-tint: #eef5fb; --settings-border: #c5d8e9; }
.mother-settings [data-settings-tone=sand] { --settings-accent: #8a6936; --settings-tint: #faf5e9; --settings-border: #e1d3b8; }
.mother-settings .settings-card > header,
.mother-settings .settings-card > details > summary {
  padding: 14px 16px; background: var(--settings-tint); border-bottom: 1px solid var(--settings-border);
  border-radius: 10px 13px 0 0; color: var(--ink); gap: 10px;
}
.mother-settings .settings-card > header h2,
.mother-settings .settings-card > details > summary b,
.mother-settings .health-v020-preferences > h2 {
  display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; line-height: 1.4; margin: 0;
}
.mother-settings .settings-section-icon { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 30px; width: 30px; height: 30px; border-radius: 8px; color: var(--settings-accent); background: var(--surface); border: 1px solid var(--settings-border); }
.mother-settings .settings-section-icon .ic { width: 19px; height: 19px; }
.mother-settings .settings-card > .sheet { padding: 16px; border-radius: 0 0 10px 12px; }
.mother-settings #health-display-settings > .health-v020-preferences { margin: 0; padding: 16px; border: 0; border-radius: inherit; background: transparent; }
.mother-settings .health-v020-preferences > h2 { padding: 12px; background: var(--settings-tint); border: 1px solid var(--settings-border); border-radius: 9px; }
.mother-settings .health-v020-preferences > h2::before { content: ''; flex: 0 0 22px; height: 22px; background: var(--settings-accent); mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='1.8' d='M3 3v18h18M7 15l4-4 3 3 5-6'/%3E%3C/svg%3E") center / contain no-repeat; }
.mother-settings #settings-ai-memory > summary { min-height: 44px; padding: 10px 0; font-weight: 650; cursor: pointer; }
.mother-settings #settings-ai-memory-content { margin-top: 12px; overflow-wrap: anywhere; }
.mother-settings #settings-ai-memory-content .memory-section { background: transparent; }
.mother-settings #settings-ai-memory-content .memory-section h4 { margin-top: 12px; }
.mother-settings #settings-ai-memory-content button { min-height: 44px; white-space: normal; }
.mother-settings .settings-card input:not([type=radio]):not([type=checkbox]),
.mother-settings .settings-card select, .mother-settings .settings-card textarea { max-width: 100%; box-sizing: border-box; }
:root[data-theme=dark] .mother-settings .settings-card { --settings-accent: #b7c4d8; --settings-tint: #29313d; --settings-border: #526175; }
:root[data-theme=dark] .mother-settings [data-settings-tone=rose] { --settings-accent: #e8afc1; --settings-tint: #3c2d36; --settings-border: #795363; }
:root[data-theme=dark] .mother-settings [data-settings-tone=teal] { --settings-accent: #9bd7c9; --settings-tint: #253936; --settings-border: #476e65; }
:root[data-theme=dark] .mother-settings [data-settings-tone=violet] { --settings-accent: #cdb5ed; --settings-tint: #352e42; --settings-border: #6d597f; }
:root[data-theme=dark] .mother-settings [data-settings-tone=blue] { --settings-accent: #a9ccec; --settings-tint: #273746; --settings-border: #4d6a82; }
:root[data-theme=dark] .mother-settings [data-settings-tone=sand] { --settings-accent: #e2c592; --settings-tint: #3b3428; --settings-border: #7c6a4d; }
@media (prefers-color-scheme: dark) {
 :root:not([data-theme=light]) .mother-settings .settings-card { --settings-accent: #b7c4d8; --settings-tint: #29313d; --settings-border: #526175; }
 :root:not([data-theme=light]) .mother-settings [data-settings-tone=rose] { --settings-accent: #e8afc1; --settings-tint: #3c2d36; --settings-border: #795363; }
 :root:not([data-theme=light]) .mother-settings [data-settings-tone=teal] { --settings-accent: #9bd7c9; --settings-tint: #253936; --settings-border: #476e65; }
 :root:not([data-theme=light]) .mother-settings [data-settings-tone=violet] { --settings-accent: #cdb5ed; --settings-tint: #352e42; --settings-border: #6d597f; }
 :root:not([data-theme=light]) .mother-settings [data-settings-tone=blue] { --settings-accent: #a9ccec; --settings-tint: #273746; --settings-border: #4d6a82; }
 :root:not([data-theme=light]) .mother-settings [data-settings-tone=sand] { --settings-accent: #e2c592; --settings-tint: #3b3428; --settings-border: #7c6a4d; }
}
@media (max-width: 600px) {
 .mother-settings .settings-card { margin-bottom: 18px; }
 .mother-settings .settings-card > header,
 .mother-settings .settings-card > details > summary { padding: 12px; }
 .mother-settings .settings-card > .sheet,
 .mother-settings #health-display-settings > .health-v020-preferences { padding: 12px; }
 .mother-settings .settings-card .row > div { min-width: 0; }
 .mother-settings .settings-card .row > .auto { max-width: 100%; }
 .mother-settings .settings-card button { white-space: normal; }
}
.doctor-combobox { position:relative; margin:16px 0; }
.doctor-options { list-style:none; margin:4px 0; padding:4px; max-height:280px; overflow-y:auto; border:1px solid var(--line); border-radius:10px; background:var(--surface); }
.doctor-options [role=option] { padding:12px; min-height:44px; cursor:pointer; border-radius:7px; }
.doctor-options [role=option] span { display:block; font-size:13px; color:var(--muted); }
.doctor-options [aria-selected=true],.doctor-options [role=option]:hover { background:var(--settings-tint,#eef5f3); outline:1px solid var(--settings-border,#6e9b90); }
.doctor-combobox [data-selection] { padding:12px; margin-top:10px; background:var(--settings-tint,#eef5f3); border-radius:10px; }
.mother-settings [hidden],.doctor-combobox [hidden] { display:none!important; }
.mother-settings input[readonly] { background:var(--bg); color:var(--muted); }
.privacy-actions { margin-top:28px; padding-top:20px; border-top:1px solid var(--line); }
.privacy-action-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.privacy-action-grid article { border:1px solid var(--line); border-radius:12px; padding:16px; min-width:0; }
.privacy-action-grid p { font-size:14px; }
.privacy-delete-dialog { width:min(620px,calc(100vw - 32px)); max-height:90dvh; overflow:auto; padding:24px; border:1px solid var(--line); border-radius:16px; color:var(--text); background:var(--surface); }
.privacy-delete-dialog::backdrop { background:rgba(20,24,32,.55); }
.privacy-delete-dialog header { display:flex; align-items:start; justify-content:space-between; gap:16px; }
.privacy-delete-dialog h2 { font-size:21px; }
.privacy-delete-dialog label { display:block; margin:16px 0; }
.privacy-delete-dialog .check { display:flex; gap:10px; align-items:start; }
.privacy-delete-dialog .check input { width:auto; flex:none; }
.privacy-delete-dialog button { min-height:44px; margin:6px 8px 6px 0; white-space:normal; }
@media(max-width:600px){.privacy-action-grid{grid-template-columns:1fr}.privacy-delete-dialog{padding:16px}}
.document-privacy-dialog { width:min(1040px,calc(100vw - 24px)); max-height:94dvh; overflow:auto; background:var(--surface); color:var(--text); border:1px solid var(--line); border-radius:16px; padding:20px; }
.document-privacy-dialog::backdrop { background:rgba(20,24,32,.55); }
.document-privacy-dialog header,.document-privacy-dialog [data-privacy-tools] { display:flex; flex-wrap:wrap; align-items:center; gap:10px; }
.document-privacy-dialog header { justify-content:space-between; }
.document-privacy-dialog h2 { font-size:21px; }
.document-privacy-dialog label { display:block; }
.document-privacy-dialog .check { display:flex; gap:10px; margin:20px 0; }
.document-privacy-dialog .check input { width:auto; }
.document-privacy-dialog button { min-height:44px; white-space:normal; }
.document-privacy-dialog [data-privacy-tools] { padding:12px 0; }
.document-privacy-stage { background:#dce1e6; padding:6px; border-radius:8px; }
.document-privacy-stage canvas { display:block; width:100%; height:auto; }
.document-privacy-stage canvas.is-editing { touch-action:none; cursor:crosshair; }
.document-privacy-dialog [data-region-form] { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.document-privacy-dialog [hidden] { display:none!important; }
.pr-processing { padding:16px; }
@media(max-width:600px){.mother-settings #mani-dati .row{display:flex;flex-direction:column;gap:12px}.mother-settings #mani-dati .row>div{width:100%;flex:auto}.mother-settings #mani-dati input,.mother-settings #mani-dati select{width:100%}}
