.feedback-page {width:100%;max-width:none;min-width:0;box-sizing:border-box;margin-inline:0;}
.feedback-page .fb-heading {display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:14px;}
.feedback-page .fb-heading h1 {margin:0;}
.feedback-page .fb-note {padding:12px 16px;background:var(--surface);border:1px solid var(--line);border-radius:12px;color:var(--ink-2);}
.feedback-page .fb-compose,.feedback-page .fb-inbox,.feedback-page .fb-detail,.feedback-page .fb-admin-edit {background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:20px;margin-bottom:18px;min-width:0;}
.feedback-page label {display:block;font-weight:600;font-size:14px;margin:12px 0 6px;}
.feedback-page input,.feedback-page select,.feedback-page textarea {display:block;width:100%;min-width:0;box-sizing:border-box;margin-top:6px;min-height:44px;}
.feedback-page textarea {min-height:120px;resize:vertical;font:inherit;}
.feedback-page input[type=file] {font-size:13px;padding:8px;}
.feedback-page button,.feedback-page summary {min-height:44px;}
.feedback-page summary {cursor:pointer;font-weight:650;padding-block:10px;}
.feedback-page .fb-fields,.feedback-page .fb-filters {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;align-items:end;}
.feedback-page .fb-filters {grid-template-columns:repeat(auto-fit,minmax(145px,1fr));}
.feedback-page .fb-filters label {margin:0;}
.feedback-page .fb-badges {display:flex;gap:8px;flex-wrap:wrap;margin-bottom:8px;font-size:12px;}
.feedback-page .fb-state,.feedback-page .fb-decision {border:1px solid var(--line);border-radius:6px;padding:4px 8px;}
.feedback-page .fb-state {font-weight:700;}
.feedback-page .fb-items {list-style:none;padding:0;margin:14px 0;}
.feedback-page .fb-items li {border-bottom:1px solid var(--line);}
.feedback-page .fb-items a {display:flex;flex-direction:column;gap:7px;padding:16px 0;color:var(--ink);text-decoration:none;overflow-wrap:anywhere;}
.feedback-page .fb-items a:hover b {text-decoration:underline;}
.feedback-page .fb-pages {display:flex;justify-content:space-between;align-items:center;gap:8px;}
.feedback-page .fb-text,.feedback-page .fb-response p,.feedback-page .fb-history p {white-space:pre-wrap;overflow-wrap:anywhere;}
.feedback-page .fb-detail>header {padding:0;margin-bottom:14px;display:block;border:0;}
.feedback-page .fb-history {padding-left:20px;}
.feedback-page .fb-history li {padding:10px 0;border-bottom:1px solid var(--line);}
.feedback-page .fb-history time,.feedback-page .fb-history b,.feedback-page .fb-history span {display:block;margin-bottom:5px;}
.feedback-page .fb-previews,.feedback-page .fb-attachments {display:flex;gap:12px;flex-wrap:wrap;margin-block:12px;}
.feedback-page figure {margin:0;max-width:220px;min-width:0;width:calc(33.333% - 8px);}
.feedback-page figure img {display:block;width:100%;height:150px;object-fit:contain;border:1px solid var(--line);border-radius:10px;background:var(--canvas);}
.feedback-page figcaption {font-size:12px;overflow-wrap:anywhere;}
.feedback-page figcaption button {display:block;margin-top:6px;}
.feedback-page [data-fb-error]:empty,.feedback-page [data-fb-progress]:empty {display:none;}
.feedback-page [data-fb-summary] {font-weight:700;margin:16px 0;}
.feedback-page [data-fb-current] {white-space:pre-wrap;overflow-wrap:anywhere;border:1px solid var(--line);padding:12px;margin-bottom:12px;}
#topbar .feedback-shortcut {display:inline-flex;position:relative;align-items:center;justify-content:center;gap:6px;width:auto;min-width:44px;min-height:44px;padding:8px 10px;color:var(--ink);border-radius:10px;white-space:nowrap;text-decoration:none;font-size:13px;font-weight:650;}
#topbar .feedback-shortcut:hover {background:var(--surface);}
#topbar .feedback-shortcut .badge {position:absolute;right:0;top:0;font-size:10px;}
#topbar .feedback-shortcut svg {width:22px;height:22px;}
.chat-sender {display:inline-flex;align-items:center;justify-content:center;min-width:26px;height:26px;padding-inline:5px;border-radius:50%;background:var(--surface);border:1px solid var(--line);font-size:11px;font-weight:750;color:var(--ink);vertical-align:middle;}
.chat-recipient-text {font-size:11px;color:var(--ink-2);}
.service-unavailable {font-weight:750!important;color:#ae1f35!important;}
:root[data-theme=dark] .service-unavailable {color:#ff9bad!important;}
@media(prefers-color-scheme:dark){:root:not([data-theme=light]) .service-unavailable {color:#ff9bad!important;}}
@media(max-width:600px){.feedback-page .fb-fields,.feedback-page .fb-filters {grid-template-columns:1fr;}.feedback-page .fb-compose,.feedback-page .fb-inbox,.feedback-page .fb-detail,.feedback-page .fb-admin-edit {padding:14px;}.feedback-page figure {width:calc(50% - 6px);}.feedback-page button {white-space:normal;}}
/* One extra global control: keep all five bottom destinations unchanged. */
@media(max-width:640px){#topbar {gap:3px;}#topbar .aichip,#topbar #aichip {display:none;}#topbar .brand {font-size:12px;}#topbar .sep {display:none;}#topbar .feedback-shortcut {width:auto;min-width:44px;padding:6px;font-size:11px;gap:4px;}#topbar .feedback-shortcut svg {width:18px;height:18px;}#topbar .mother-settings-shortcut {width:44px;min-width:44px;}#topbar .design-variant-control select {width:70px;max-width:70px;}}

/* Immediate, chat-like feedback entry; attachment controls stay usable on a phone. */
.feedback-page .fb-visually-hidden {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;}
.feedback-page .fb-compose {padding:0;border:0;background:transparent;}
.feedback-page [data-fb-compose] {position:relative;min-width:0;border:1px solid var(--line);border-radius:22px;padding:16px;background:var(--surface);transition:border-color .15s,box-shadow .15s;}
.feedback-page [data-fb-compose]:focus-within {border-color:var(--focus,#884257);box-shadow:0 0 0 2px color-mix(in srgb,var(--focus,#884257) 14%,transparent);}
.feedback-page .fb-compose textarea {margin:0;padding:4px 2px 12px;min-height:126px;max-height:380px;line-height:1.6;background:transparent;border:0;box-shadow:none;color:var(--ink);}
.feedback-page .fb-compose textarea:focus {outline:none;box-shadow:none;}
.feedback-page [data-fb-files][hidden] {display:none!important;}
.feedback-page .fb-compose-toolbar {display:flex;align-items:center;gap:10px;min-width:0;}
.feedback-page .fb-attach-button {display:inline-flex;align-items:center;justify-content:center;gap:4px;min-width:44px;padding:6px 10px;border-radius:12px;font-size:13px;}
.feedback-page .fb-attach-button>span:first-child {font-size:24px;line-height:1;}
.feedback-page .fb-send-button {margin-left:auto;border-radius:14px;display:inline-flex;align-items:center;gap:10px;min-height:44px;padding:10px 16px;}
.feedback-page .fb-send-button>span {font-size:20px;line-height:1;}
.feedback-page .fb-file-count {font-size:12px;color:var(--muted);}
.feedback-page .fb-compose-hint,.feedback-page .fb-privacy-note {font-size:12px;line-height:1.5;color:var(--muted);margin:12px 0 0;}
.feedback-page .fb-privacy-note {padding-inline:4px;}
.feedback-page .fb-previews:empty {display:none;}
.feedback-page .fb-preview {position:relative;flex:0 1 160px;width:160px;max-width:100%;border:1px solid var(--line);padding:8px;border-radius:14px;background:var(--canvas);box-sizing:border-box;}
.feedback-page .fb-preview img {height:90px;border:0;border-radius:8px;}
.feedback-page .fb-preview figcaption {padding-top:6px;display:flex;flex-direction:column;gap:3px;}
.feedback-page .fb-preview figcaption button {position:absolute;top:2px;right:2px;display:flex;align-items:center;justify-content:center;width:44px;min-width:44px;height:44px;min-height:44px;margin:0;border-radius:12px;padding:0;background:var(--surface);font-size:24px;color:var(--ink);}
.feedback-page .fb-file-name {font-size:12px;line-height:1.4;overflow-wrap:anywhere;padding-right:2px;}
.feedback-page .fb-file-size {font-size:11px;color:var(--muted);}
.feedback-page .fb-file-type {display:flex;align-items:center;justify-content:center;min-height:90px;font-size:22px;font-weight:750;color:var(--accent,#884257);background:color-mix(in srgb,var(--accent,#884257) 8%,var(--surface));border-radius:8px;}
.feedback-page .fb-pdf-download {display:grid;gap:8px;min-height:150px;text-align:center;padding:8px;border:1px solid var(--line);border-radius:10px;}
.feedback-page .fb-drop-message {display:none;position:absolute;inset:5px;z-index:3;align-items:center;justify-content:center;pointer-events:none;border:2px dashed var(--focus,#884257);border-radius:17px;background:var(--surface);color:var(--ink);font-weight:700;}
.feedback-page .fb-dragging .fb-drop-message {display:flex;}
.feedback-page .fb-progress {font-size:13px;color:var(--muted);line-height:1.5;}
.feedback-page [aria-busy=true] .fb-progress::before {content:'';display:inline-block;width:12px;height:12px;border:2px solid var(--line);border-top-color:var(--focus,#884257);border-radius:50%;vertical-align:-2px;margin-right:7px;animation:fb-send-spin .8s linear infinite;}
@keyframes fb-send-spin {to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.feedback-page [aria-busy=true] .fb-progress::before{animation:none}}
@media(max-width:600px){.feedback-page [data-fb-compose]{padding:12px;}.feedback-page .fb-preview{flex-basis:calc(50% - 6px);width:calc(50% - 6px);}.feedback-page .fb-attach-button{padding:6px;}.feedback-page .fb-send-button{padding:10px 12px;gap:7px;}.feedback-page .fb-compose-toolbar{gap:6px;}}

.ai-range-form {display:flex;gap:12px;align-items:end;flex-wrap:wrap;margin-block:20px;}.ai-range-form label {display:grid;gap:6px;min-width:130px;}.ai-range-form input,.ai-range-form button {min-height:44px;}.ai-range-form [role=alert] {flex-basis:100%;}

.feedback-page .fb-response {padding:12px 14px;margin:14px 0;border:1px solid var(--line);border-radius:10px;background:var(--canvas);}.feedback-page .fb-response h3 {margin:0 0 8px;}.feedback-page .fb-response p {margin:0;}

#mtab {max-width:100%;overflow-x:auto;}
#mtab .admin-mothers-table {min-width:1180px;width:100%;table-layout:auto;}
#mtab .admin-plan-cell {min-width:188px;white-space:normal;}
#mtab .admin-plan-controls {display:grid;gap:8px;min-width:172px;}
#mtab [data-mplan],#mtab [data-muntil] {display:block;width:100%;min-width:0;max-width:100%;min-height:44px;box-sizing:border-box;margin:0;}
#mtab .admin-mothers-table th:nth-last-child(-n+2),#mtab .admin-mothers-table td:nth-last-child(-n+2) {padding-left:16px;white-space:nowrap;}
/* Let the mothers filters wrap; horizontal scrolling belongs to the data table only. */
#main:has(#mtab) .toolbar .auto {min-width:0;max-width:100%;}
#main:has(#mtab) .toolbar .seg {flex-wrap:wrap;max-width:100%;}
