/* Behavior and layout shared by filters, forms, and confirmations. */
:root { --control-radius: 12px; --control-height: 52px; --focus-ring: 0 0 0 3px rgba(0,107,98,.16); --md-primary:var(--brand); --md-on-primary:#fff; --md-surface:var(--surface); --md-on-surface:var(--ink); --md-outline:var(--outline); --md-error:var(--danger); --md-field-shape:4px; --md-dialog-shape:28px; }
.select-source { position:absolute!important; width:1px!important; height:1px!important; padding:0!important; margin:0!important; overflow:hidden!important; clip:rect(0,0,0,0)!important; white-space:nowrap!important; }
.multi-source { display:none!important; }
.select-trigger { display:flex; width:100%; min-width:0; min-height:var(--control-height); align-items:center; justify-content:space-between; padding:12px 14px; text-align:left; color:var(--ink); background:var(--surface); border:1px solid var(--outline); border-radius:var(--control-radius); cursor:pointer; font-size:16px; line-height:24px; }
.select-trigger > span { min-width:0; overflow-wrap:anywhere; }
.select-trigger > svg { flex:0 0 20px; width:20px; height:20px; margin-left:10px; color:var(--ink-muted); }
.select-trigger.placeholder { color:var(--ink-muted); }
.select-trigger:hover:not(:disabled) { background:var(--surface-soft); }
.select-trigger[aria-expanded=true] { border-color:var(--brand); box-shadow:var(--focus-ring); }
.select-trigger:focus-visible { outline:2px solid var(--brand); outline-offset:2px; }
.compact-control { width:auto; max-width:156px; min-height:48px; padding:10px 12px; border-color:var(--outline-soft); border-radius:var(--control-radius); color:var(--brand-dark); font-size:14px; line-height:20px; font-weight:500; }
.compact-control > span { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.compact-control > svg { width:16px; height:16px; flex-basis:16px; margin-left:6px; }
.filter-grid .compact-control { width:100%; max-width:none; padding:10px; }
.tool-row .compact-control { flex:0 1 auto; }
.tool-row .search-field { display:block; }
.field input:not([type=checkbox]):not([type=radio]), .field textarea, .search-field input { font-size:16px; line-height:24px; border-radius:var(--control-radius); }
.field textarea { min-height:112px; max-height:320px; max-height:min(40vh,320px); resize:vertical; }
.field .draft-editor { min-height:180px; max-height:320px; max-height:min(40vh,320px); }
.field input:focus, .field textarea:focus, .search-field input:focus { border-color:var(--brand); outline:0; box-shadow:var(--focus-ring); }
.field input[aria-invalid=true], .field textarea[aria-invalid=true], .select-trigger[aria-invalid=true] { border-color:var(--danger); }
.field-error { margin:0; color:var(--danger); font-size:13px; line-height:20px; }
.check-line { min-height:48px; align-items:center; font-size:14px; line-height:21px; cursor:pointer; }
.check-line input { width:20px; height:20px; }
.selected-file .icon-button { width:48px; height:48px; flex-basis:48px; }
.text-topbar-action { min-height:48px; font-size:14px; }
/* Approved overlay theme. No flex-gap or native showModal dependency. */
:root { --overlay-surface:#eaf0ec; --overlay-on-surface:#1b1c1b; --overlay-on-surface-variant:#535e58; --overlay-outline:#737e77; --overlay-outline-variant:#cbd5ce; --overlay-primary:var(--brand); --overlay-selected:var(--brand-soft); --overlay-error:var(--danger); --overlay-radius:28px; --overlay-scrim:rgba(0,0,0,.32); --overlay-elevation:0 4px 8px 3px rgba(0,0,0,.08),0 1px 3px rgba(0,0,0,.12); }
.modal-open { overflow:hidden;overscroll-behavior:none; }
.modal-layer { position:fixed;z-index:100;top:var(--visible-top,0px);left:0;width:100%;height:100vh;height:var(--visible-height,100vh);display:flex;align-items:center;justify-content:center;padding:24px;background:var(--overlay-scrim);overscroll-behavior:contain; }
.modal-layer[hidden] { display:none; }
.modal-layer dialog { position:relative;inset:auto;top:auto;right:auto;bottom:auto;left:auto;margin:0;width:100%;max-width:360px;max-height:100%;min-height:0;overflow:hidden;padding:24px;border:0;background:var(--overlay-surface);color:var(--overlay-on-surface);border-radius:var(--overlay-radius);box-shadow:var(--overlay-elevation); }
.modal-layer dialog:not([open]) { display:none; }
.modal-layer dialog[open] { display:flex;flex-direction:column;animation:overlay-enter 200ms cubic-bezier(.2,0,0,1); }
.modal-layer dialog h2 { margin:0 0 16px;font-size:24px;line-height:32px;font-weight:400;overflow-wrap:anywhere;flex-shrink:0; }
.dialog-body { min-height:0;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch; }
.modal-layer .dialog-body p { margin:0;color:var(--overlay-on-surface-variant);font-size:14px;line-height:22px;overflow-wrap:anywhere;white-space:pre-line; }
.dialog-actions { display:flex;flex-shrink:0;flex-wrap:wrap;align-items:center;justify-content:flex-end;margin:24px -12px -4px 0; }
.dialog-actions>button+button { margin-left:8px; }
.overlay-action { display:inline-flex;align-items:center;justify-content:center;flex:0 1 auto;min-height:48px;min-width:64px;margin:0;padding:12px;border:0;border-radius:24px;background:transparent;color:var(--overlay-primary);font:inherit;font-size:14px;font-weight:500;line-height:20px;text-align:center;cursor:pointer;overflow-wrap:anywhere; }
.overlay-action.secondary { color:var(--overlay-on-surface-variant); }
.overlay-action.is-danger { color:var(--overlay-error); }
.overlay-action:hover:not(:disabled) { background:rgba(0,107,98,.08); }
.overlay-action:active:not(:disabled) { background:rgba(0,107,98,.12); }
.overlay-action.is-danger:hover:not(:disabled) { background:rgba(179,38,30,.08); }
.overlay-action.is-danger:active:not(:disabled) { background:rgba(179,38,30,.12); }
.overlay-action.filled { color:#fff;background:var(--overlay-primary);padding-left:24px;padding-right:24px; }
.overlay-action.filled:hover:not(:disabled) { background:#14776f; }
.overlay-action.filled:active:not(:disabled) { background:#1f7d75; }
.overlay-action:disabled { color:rgba(27,28,27,.38);cursor:default; }
.overlay-action.filled:disabled { background:rgba(27,28,27,.12);color:rgba(27,28,27,.38); }
.overlay-action[aria-busy=true] { min-width:144px; }
.overlay-icon-button { display:inline-flex;align-items:center;justify-content:center;flex:0 0 48px;width:48px;height:48px;min-width:48px;min-height:48px;margin:0;padding:12px;border:0;border-radius:50%;color:var(--overlay-on-surface-variant);background:transparent;cursor:pointer; }
.overlay-icon-button svg { width:24px;height:24px; }
.overlay-icon-button:hover { background:rgba(27,28,27,.08); }
.overlay-icon-button:active { background:rgba(27,28,27,.12); }
.overlay-action:focus-visible,.overlay-icon-button:focus-visible { outline:2px solid var(--overlay-primary);outline-offset:2px; }
.keyboard-input .overlay-action:focus,.keyboard-input .overlay-icon-button:focus { outline:2px solid var(--overlay-primary);outline-offset:2px; }
.dialog-risk-icon { width:24px;height:24px;margin:0 auto 16px;flex-shrink:0;color:var(--overlay-error); }
.dialog-risk-icon svg { width:24px;height:24px; }
.has-risk-icon h2 { text-align:center; }
.sheet-layer { align-items:flex-end;padding:0; }
.modal-layer .selection-sheet[open] { width:100%;max-width:480px;max-height:88%;padding:0;border-radius:28px 28px 0 0;animation:sheet-enter 250ms cubic-bezier(.2,0,0,1); }
.sheet-header,.overlay-header { display:flex;flex-shrink:0;align-items:center;justify-content:space-between;padding:16px 16px 12px 24px; }
.modal-layer .sheet-header h2,.modal-layer .overlay-header h2 { flex:1;min-width:0;margin:0;font-size:22px;line-height:28px;font-weight:400; }
.sheet-header .overlay-icon-button,.overlay-header .overlay-icon-button { margin-left:8px; }
.sheet-options { min-height:0;overflow-y:auto;padding:4px 16px 16px;padding-bottom:max(16px,env(safe-area-inset-bottom));overscroll-behavior:contain;-webkit-overflow-scrolling:touch; }
.sheet-choice-group { min-width:0;margin:0;padding:0;border:0; }
.sheet-option { position:relative;display:flex;align-items:center;justify-content:space-between;min-height:64px;width:100%;margin:0;padding:16px 8px;border:0;border-radius:8px;background:transparent;color:var(--overlay-on-surface);font-size:16px;line-height:24px;text-align:left;cursor:pointer; }
.sheet-option+.sheet-option { margin-top:2px; }
.sheet-option.selected { background:var(--overlay-selected);color:var(--brand-dark); }
.sheet-option:not(.disabled):not(.selected):hover { background:rgba(0,107,98,.08); }
.sheet-option:not(.disabled):active { background:rgba(0,107,98,.12); }
.sheet-option.disabled { opacity:.5;cursor:default; }
.option-label { flex:1;min-width:0;overflow-wrap:anywhere; }
.option-label small { display:block;margin-top:2px;color:var(--overlay-on-surface-variant);font-size:12px;line-height:18px; }
.sheet-option input { position:absolute;right:8px;top:50%;width:24px;height:24px;margin:0;transform:translateY(-50%);opacity:0; }
.selection-mark { position:relative;flex:0 0 20px;width:20px;height:20px;margin-left:16px;border:2px solid var(--overlay-outline);border-radius:50%;pointer-events:none; }
.sheet-option input:checked~.selection-mark { border-color:var(--overlay-primary); }
.sheet-option input[type=radio]:checked~.selection-mark::after { content:'';position:absolute;top:3px;left:3px;right:3px;bottom:3px;border-radius:50%;background:var(--overlay-primary); }
.selection-mark.multiple { border-radius:3px; }
.sheet-option input[type=checkbox]:checked~.selection-mark { background:var(--overlay-primary); }
.sheet-option input[type=checkbox]:checked~.selection-mark::after { content:'';position:absolute;width:5px;height:9px;left:5px;top:1px;border:solid #fff;border-width:0 2px 2px 0;transform:rotate(45deg); }
.sheet-option input:focus-visible~.selection-mark { outline:2px solid var(--overlay-primary);outline-offset:4px; }
.keyboard-input .sheet-option input:focus~.selection-mark { outline:2px solid var(--overlay-primary);outline-offset:4px; }
.sheet-footer { flex-shrink:0;padding:16px 24px 24px;padding-bottom:max(24px,env(safe-area-inset-bottom));border-top:1px solid var(--overlay-outline-variant); }
.sheet-empty { margin:0;padding:24px 8px;color:var(--overlay-on-surface-variant);font-size:14px;line-height:22px; }
.image-choice-grid { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-gap:12px; }
.image-choice-grid .sheet-empty { grid-column:1/-1; }
.image-choice-grid .image-option { display:flex;flex-direction:column;align-items:stretch;padding:8px;min-height:144px;border-radius:12px;margin:0; }
.image-option img { width:100%;height:112px;object-fit:cover;border-radius:8px; }
.image-option .option-label { width:100%;font-size:14px;line-height:20px;padding:8px 0 0; }
.image-option .selection-mark { position:absolute;right:16px;top:16px;margin:0;background:var(--overlay-surface); }
.image-option input { top:16px;right:16px;transform:none; }
.image-unavailable { justify-content:center; }
.modal-layer .review-dialog { max-width:560px;max-height:88%;padding:0; }
.review-dialog .dialog-body { padding:0 24px 16px; }
.review-dialog .dialog-actions { margin:0;padding:12px 24px 24px;border-top:1px solid var(--overlay-outline-variant); }
.review-dialog .overlay-feedback:not(:empty) { margin-top:16px;font-size:14px;line-height:22px;overflow-wrap:anywhere; }
.review-dialog .overlay-feedback.is-error { color:var(--overlay-error); }
.viewer-layer { padding:0; }
.modal-layer .image-review { width:100%;max-width:none;height:100%;max-height:100%;border-radius:0;padding:0; }
.image-review .dialog-body { flex:1;display:flex;flex-direction:column; }
.image-review .review-image { display:block;min-height:80px;max-height:calc(var(--visible-height,100vh) - 250px);width:100%;flex:1 1 auto;object-fit:contain; }
.image-review .review-image[hidden] { display:none; }
.image-review .review-description { padding-top:16px; }
.image-review .dialog-actions { flex-shrink:0;padding-bottom:max(24px,env(safe-area-inset-bottom)); }
.image-review .overlay-action.filled { min-width:144px; }
.shared-feedback { display:flex;align-items:flex-start;min-width:0;padding:8px 4px 8px 12px;margin:0 0 16px;border-radius:8px;background:var(--surface-soft);font-size:14px;line-height:22px;color:var(--overlay-on-surface-variant); }
.shared-feedback.is-error { color:var(--overlay-error);background:#fff1ee; }
.shared-feedback>svg { width:20px;height:20px;flex:0 0 20px;margin:14px 8px 0 0; }
.shared-feedback>span { flex:1;min-width:0;padding:12px 0;overflow-wrap:anywhere;white-space:pre-line; }
.shared-feedback .overlay-icon-button { margin-left:4px;color:inherit; }
.toast { position:fixed;z-index:60;right:16px;bottom:calc(var(--bottom-height) + 24px + env(safe-area-inset-bottom));left:16px;width:calc(100% - 32px);max-width:420px;margin:0 auto;padding:14px 16px;color:#f0f5f1;background:#28332e;border-radius:4px;box-shadow:0 3px 8px rgba(0,0,0,.12);font-size:14px;line-height:20px;opacity:0;pointer-events:none;transform:translateY(8px);transition:opacity 160ms ease,transform 160ms ease; }
.toast.visible { opacity:1;transform:none; }
.toast[aria-hidden=true] { visibility:hidden; }
@keyframes overlay-enter { from { opacity:0;transform:translateY(8px) scale(.98); } to { opacity:1;transform:none; } }
@keyframes sheet-enter { from { opacity:0;transform:translateY(32px); } to { opacity:1;transform:none; } }
@media(min-width:640px) { .sheet-layer,.viewer-layer { align-items:center;padding:24px; } .modal-layer .selection-sheet[open] { border-radius:28px;max-height:84%; } .modal-layer .image-review { width:100%;max-width:800px;height:auto;max-height:100%;border-radius:28px; } }
@media(max-width:365px) { .modal-layer { padding:20px; } .sheet-layer,.viewer-layer { padding:0; } }
@media(prefers-reduced-motion:reduce) { .modal-layer dialog[open],.modal-layer .selection-sheet[open] { animation:none; } .toast { transition:none; } }
.keyboard-open .bottom-nav { display:none; }
.keyboard-open .root-screen { padding-bottom:24px; }
.keyboard-open .toast { bottom:16px; }
.screen { scroll-margin-top:80px; }
@supports not (overflow:clip) { .app-shell { overflow:visible; } }
@media (max-width:365px) { .filter-grid .compact-control { padding:10px 8px; font-size:13px; } .filter-grid .compact-control > svg { margin-left:3px; } .sheet-header { padding-left:20px; } }

/* Shared outlined-field variant; used by the phone-binding feature. */
.field.m3-outlined-field { position:relative; gap:4px; padding-top:8px; }
.field.m3-outlined-field > label { position:absolute; z-index:1; top:0; left:12px; padding:0 4px; background:var(--md-surface); color:var(--ink-muted); font-size:12px; font-weight:400; line-height:16px; }
.field.m3-outlined-field > input:not([type=checkbox]):not([type=radio]) { height:56px; min-height:56px; border-radius:var(--md-field-shape); padding:16px; line-height:24px; box-shadow:none; }
.field.m3-outlined-field:focus-within > label { color:var(--md-primary); }
.field.m3-outlined-field > input:focus { border:2px solid var(--md-primary); padding:15px; }
.field.m3-outlined-field > input[aria-invalid=true] { border-color:var(--md-error); }
.field.m3-outlined-field.has-error > label { color:var(--md-error); }
.field.m3-outlined-field > small,.field.m3-outlined-field > .field-error { padding:0 16px; font-size:12px; line-height:16px; }
.phone-scope { color:var(--md-on-surface); }
.phone-summary p { margin:0 0 8px; color:var(--ink-muted); font-size:14px; line-height:20px; }
.phone-summary strong { font-size:22px; line-height:28px; font-weight:400; }
.phone-row { padding:16px; border-bottom:1px solid var(--outline-soft); }
.phone-row:last-child { border:0; }
.phone-row-copy { display:flex; flex-direction:column; gap:4px; min-width:0; overflow-wrap:anywhere; }
.phone-row-copy strong { font-size:16px; line-height:24px; font-weight:500; }
.phone-row-copy span,.phone-row-copy small { font-size:14px; line-height:20px; color:var(--ink-muted); }
.phone-row-actions { display:flex; justify-content:flex-end; gap:8px; margin-top:8px; }
.phone-notice { padding:16px; background:var(--surface-soft); border-radius:12px; }
.phone-notice h2,.phone-empty h2 { font-size:18px; line-height:24px; margin:0 0 8px; font-weight:500; }
.phone-notice p,.phone-empty p { font-size:14px; line-height:22px; margin:0 0 12px; }
.phone-notice p:last-child { margin-bottom:0; }
.phone-empty { padding:32px 20px; text-align:center; }
.phone-key { overflow-wrap:anywhere; }
.phone-scope .primary-button:active:not(:disabled),.phone-scope .text-button:active:not(:disabled) { filter:brightness(.92); }
.phone-scope button:focus-visible { outline:2px solid var(--md-primary); outline-offset:3px; }
.phone-scope button:disabled { cursor:default; }
