/* 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; }
.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:20px; background:rgba(12,28,24,.42); overscroll-behavior:contain; }
.modal-layer[hidden] { display:none; }
.modal-layer dialog { position:relative; top:auto; right:auto; bottom:auto; left:auto; margin:0; width:100%; max-width:360px; max-height:100%; overflow:auto; padding:24px; border:0; background:var(--canvas); color:var(--ink); border-radius:24px; box-shadow:var(--shadow); }
.modal-layer dialog:not([open]) { display:none; }
.modal-layer dialog[open] { display:block; }
.modal-layer dialog h2 { font-size:22px; line-height:30px; font-weight:600; overflow-wrap:anywhere; }
.dialog-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; margin-top:24px; }
.dialog-actions > button { margin-left:8px; min-width:80px; }
.modal-layer .confirmation-dialog p { margin-bottom:0; font-size:15px; line-height:23px; }
.sheet-layer { align-items:flex-end; padding:0; }
.modal-layer .selection-sheet[open] { display:flex; flex-direction:column; width:100%; max-width:480px; max-height:82%; padding:0; border-radius:24px 24px 0 0; overflow:hidden; }
.sheet-header { display:flex; flex-shrink:0; align-items:center; justify-content:space-between; padding:10px 12px 8px 24px; border-bottom:1px solid var(--outline-soft); }
.sheet-header h2 { flex:1; margin:0!important; font-size:20px!important; line-height:28px!important; }
.sheet-options { min-height:0; overflow-y:auto; padding:8px 12px max(12px,env(safe-area-inset-bottom)); overscroll-behavior:contain; -webkit-overflow-scrolling:touch; }
.sheet-option { display:flex; align-items:center; justify-content:space-between; min-height:56px; width:100%; padding:14px 12px; border:0; border-radius:12px; background:transparent; color:var(--ink); font-size:16px; line-height:24px; text-align:left; cursor:pointer; }
.sheet-option.selected { background:var(--brand-soft); color:var(--brand-dark); font-weight:500; }
.sheet-option:focus-visible { outline:2px solid var(--brand); outline-offset:-2px; }
.option-label { min-width:0; overflow-wrap:anywhere; }
.selection-mark { flex:0 0 20px; width:20px; height:20px; margin-left:16px; border:2px solid var(--outline); border-radius:50%; }
.selected .selection-mark { border:6px solid var(--brand); }
.selection-mark.multiple { border-radius:4px; }
.selected .selection-mark.multiple { position:relative; border:0; background:var(--brand); }
.selected .selection-mark.multiple::after { position:absolute; content:''; width:6px; height:11px; top:2px; left:6px; border:solid white; border-width:0 2px 2px 0; transform:rotate(45deg); }
.sheet-footer { flex-shrink:0; padding:12px 24px max(16px,env(safe-area-inset-bottom)); border-top:1px solid var(--outline-soft); background:var(--canvas); }
.sheet-header .icon-button { margin-left:12px; }
.sheet-option:hover:not(:disabled):not(.selected) { background:var(--surface-soft); }
.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 (min-width:640px) { .sheet-layer { align-items:center; padding:24px; } .modal-layer .selection-sheet { border-radius:24px; max-height:80%; max-width:420px; } }
@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; }
.modal-layer dialog.confirmation-dialog { border-radius:var(--md-dialog-shape); padding:24px; }
.modal-layer dialog.confirmation-dialog h2 { font-size:24px; line-height:32px; font-weight:400; }
.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; }
