:root{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#23332e;background:#f5f7f3}*{box-sizing:border-box}body{margin:0}header{background:#193e35;color:white;padding:36px 24px 28px;border-radius:0 0 28px 28px}.brand{font-size:11px;letter-spacing:1.4px;font-weight:700}.brand span{display:block;color:#a5cbb9;font-size:9px;margin-top:8px}h1{font-size:30px;letter-spacing:-1px;margin:24px 0 8px}header p{font-size:14px;color:#c8ded5;margin:0}main{max-width:760px;margin:auto;padding:22px 18px}button,input,textarea,select{font:inherit}button{cursor:pointer;border:0;border-radius:12px;padding:12px 15px;background:#e8eee7;color:#264d3e}.switch{display:flex;background:#e7ede5;padding:4px;border-radius:15px}.switch button{flex:1;background:none}.switch .active{background:white;box-shadow:0 2px 8px #263b2110}nav{display:flex;gap:6px;margin:20px 0}nav button{flex:1;font-size:13px;padding:13px 5px;background:transparent}nav .active,#add,#save{background:#245d48;color:white}input,textarea,select{width:100%;border:1px solid #dce4d8;border-radius:12px;padding:13px;background:white;color:#23332e}textarea{min-height:120px;resize:vertical}.heading{display:flex;justify-content:space-between;align-items:center;margin-top:22px}h2{font-size:21px;margin:10px 0}.card{background:white;border:1px solid #e4e9df;border-radius:18px;padding:18px;margin:12px 0}.card p{white-space:pre-wrap;overflow-wrap:anywhere;margin:0 0 12px;line-height:1.5}.meta{font-size:12px;color:#788376}.empty{text-align:center;padding:40px 20px;color:#788376}.empty strong{display:block;font-size:18px;color:#344c3e;margin-bottom:8px}.bought p{text-decoration:line-through;color:#788376}.toggle{float:right;margin-left:10px}#editor{background:white;border-radius:20px;padding:20px;border:1px solid #dce4d8;margin:18px 0}label{display:block;font-size:13px;margin:15px 0}.actions{display:flex;justify-content:flex-end;gap:8px;margin-top:15px}footer{font-size:11px;text-align:center;color:#869183;margin:32px 0}#status{color:#9d5438;font-size:13px}[hidden]{display:none!important}button:disabled{opacity:.5}button:focus-visible{outline:3px solid #bda953}@media(min-width:700px){header{text-align:center}nav button{font-size:15px}}

nav{flex-wrap:wrap}nav button{flex:1 1 40%}.record-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}.record-actions button{padding:8px 12px;font-size:12px}.record-actions .delete{color:#a34436;background:#f8eeeb}

body.editing{overflow:hidden}body.editing>header,body.editing main>.switch,body.editing nav,body.editing #search,body.editing .heading,body.editing #list,body.editing footer{display:none}body.editing #status{position:fixed;z-index:12;bottom:76px;left:20px;right:20px;background:#fff6ee;padding:8px;border-radius:8px}body.editing #status:empty{display:none}
#editor{position:fixed;z-index:10;top:var(--editor-top,0px);left:0;right:0;height:var(--editor-height,100dvh);margin:0;border:0;border-radius:0;padding:16px 20px max(16px,env(safe-area-inset-bottom));background:#f5f7f3;display:flex;flex-direction:column;overflow:auto}#editorBack{align-self:flex-start;background:transparent;padding:6px 0;margin-bottom:6px}#editor h2{margin:10px 0 16px;font-size:26px}.editor-scope{margin-bottom:16px;flex-shrink:0}#editor textarea{flex:1;min-height:84px;resize:none;font-size:16px;line-height:1.5}#editor #schedule{flex-shrink:0}#editor #schedule label{margin:8px 0}#editor #schedule input,#editor #schedule select{padding:8px;font-size:16px}#editor .actions{flex-shrink:0;margin-top:12px}#editor .actions #save{flex:1;font-weight:600}#editor .actions #cancel{display:none}@media(min-width:760px){#editor{max-width:760px;left:50%;transform:translateX(-50%)}}

#editor .actions{position:sticky;bottom:0;background:#f5f7f3;padding-top:8px}#editorBack,#editor h2{flex-shrink:0}@media(max-height:500px){#editor{padding-top:8px}#editor h2{font-size:22px;margin:4px 0 8px}.editor-scope{margin-bottom:8px}.editor-scope button{padding:8px}#editor textarea{min-height:52px}}

body.workflow-open #list,body.workflow-open .heading,body.workflow-open #search{display:none}#workflow{margin-top:20px}#workflowBack{background:transparent;padding-left:0}.workflow-buttons{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}.workflow-buttons button{flex:1 1 40%;font-size:14px}.active-reminder{border-color:#bfa34a}.active-reminder button{margin:4px}#workflowInput textarea{min-height:80px}#workflowInput input{margin-top:8px}#workflowInput .actions button{background:#245d48;color:white}#attachmentLabel{flex-shrink:0;margin:8px 0}#attachmentLabel input{padding:8px}body.workflow-open #status{position:sticky;top:0;background:#fff6ee;z-index:2;padding:8px}#editor #attachmentLabel{font-size:13px}

.file-preview{position:fixed;inset:0;z-index:30;background:#f5f7f3;display:flex;flex-direction:column;gap:12px;padding:20px;overflow:auto}.file-preview img{max-width:100%;object-fit:contain;min-height:0;flex:1}.file-preview button{align-self:flex-start}

html.editor-open{overflow:hidden;overscroll-behavior:none}body.editing{position:fixed;left:0;right:0;width:100%;overscroll-behavior:none}body.editing #editor{overflow:hidden;overscroll-behavior:none;touch-action:none}#editor textarea{overflow:auto;overscroll-behavior:none;touch-action:pan-y;min-height:48px}#editor #schedule{flex-shrink:1;min-height:0;overflow:auto;overscroll-behavior:contain;touch-action:pan-y}#editorBack,#editor h2{flex-shrink:0}

body.editing #editor{transition:height 180ms cubic-bezier(.2,.7,.3,1),top 180ms cubic-bezier(.2,.7,.3,1)}@media(prefers-reduced-motion:reduce){body.editing #editor{transition:none}}

.attachment-picker{flex-shrink:0;margin:8px 0}#attachmentPick{width:100%;padding:12px;background:#e8eee7;border:1px dashed #9aad9d;text-align:left;font-size:14px}#attachmentSelected{display:flex;align-items:center;gap:10px;background:#edf2ed;border-radius:10px;margin-top:8px;padding:8px 10px}#attachmentName{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px}#attachmentRemove{flex-shrink:0;color:#9d453c;background:transparent;padding:6px;font-size:13px}

#attachmentSelected{display:block;max-height:110px;overflow:auto;touch-action:pan-y;overscroll-behavior:contain}.selected-file{display:flex;align-items:center;gap:8px;padding:4px 0}.selected-file span{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px}.selected-file button{flex-shrink:0;background:transparent;color:#9d453c;padding:5px;font-size:13px}

.attachment-buttons{display:flex;gap:8px}.attachment-buttons button{flex:1;width:auto!important;text-align:center!important;font-size:14px;border:1px dashed #9aad9d;padding:11px 8px}.selected-file img{width:44px;height:44px;object-fit:cover;border-radius:8px;flex-shrink:0}

main{padding:14px 16px calc(94px + env(safe-area-inset-bottom))}.app-tools{display:flex;align-items:center;gap:10px}.app-tools>.switch{flex:1}.app-tools .switch button{padding:9px 12px;font-size:14px}#moreMenu{position:relative}#moreMenu .more-toggle{cursor:pointer;list-style:none;font-size:14px;padding:12px 8px;white-space:nowrap}#moreMenu .more-toggle::-webkit-details-marker{display:none}.more-options{position:absolute;right:0;top:42px;min-width:190px;background:white;border:1px solid #dce4d8;border-radius:14px;padding:6px;box-shadow:0 8px 24px #193e351a;z-index:5}.more-options button{display:block;width:100%;text-align:left;background:white;font-size:14px;padding:13px 12px}nav{position:fixed;bottom:0;left:0;right:0;margin:0;padding:8px 8px calc(8px + env(safe-area-inset-bottom));background:#f5f7f3f5;border-top:1px solid #dce4d8;z-index:6;gap:4px;max-width:760px;margin-inline:auto}nav button{font-size:11px;padding:13px 2px;border-radius:10px;white-space:nowrap}nav .active{background:#245d48;color:white}.heading{margin:18px 0 12px}h2{font-size:23px}.heading #add{padding:11px 15px;font-size:14px}#search{padding:11px 13px;font-size:15px}.empty{padding:36px 16px}.card{padding:15px;margin:10px 0}body.editing .app-tools{display:none}@media(min-width:700px){nav button{font-size:14px}}

/* Shared sidebar and right-hand workspace. */
html,body{height:100%;overflow:hidden}main{max-width:none;height:100dvh;margin:0;padding:10px 10px max(10px,env(safe-area-inset-bottom));display:grid;grid-template-columns:82px minmax(0,1fr);grid-template-rows:auto minmax(0,1fr);gap:10px}.app-tools{grid-column:1/-1}.app-tools>.switch{max-width:360px;margin:auto}nav{grid-column:1;grid-row:2;position:static;display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;padding:4px 0;margin:0;max-width:none;gap:7px;border:0;border-right:1px solid #dce4d8;padding-right:8px;overflow:auto}nav button{flex:none;min-height:46px;padding:10px 3px;font-size:10px;white-space:normal;line-height:1.4}#moreMenu .more-toggle{font-size:12px;padding:13px 3px;text-align:center}.more-options{position:static;min-width:0;box-shadow:none;padding:2px;border:0;background:transparent}.more-options button{font-size:10px;padding:10px 3px;text-align:center;background:transparent}.workspace-content{grid-column:2;grid-row:2;min-width:0;min-height:0;display:flex;flex-direction:column;position:relative;overflow:hidden}.heading{margin:0 0 8px;gap:6px;flex-shrink:0}.heading h2{font-size:19px}.heading #add{padding:9px 10px;font-size:12px}#search{padding:10px;font-size:14px;flex-shrink:0}#status{flex-shrink:0;font-size:12px;margin:6px 0}#status:empty{display:none}#list{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain}.card{padding:12px;border-radius:13px}.card p{font-size:14px}.record-actions{flex-wrap:wrap}.record-actions button{padding:9px;font-size:12px}.empty{padding:28px 8px;font-size:14px}.chat-compose,#workflowInput{flex-shrink:0;display:flex;gap:6px;align-items:flex-end;margin:8px 0 0;background:white;border:1px solid #dce4d8;border-radius:14px;padding:7px}.chat-compose textarea,#workflowInput textarea{min-height:40px;max-height:100px;height:40px;resize:none;padding:9px;border:0;font-size:16px}.chat-compose button{background:#245d48;color:white;flex-shrink:0;width:38px;height:38px;padding:5px;font-size:22px}body.workflow-open #quickInput,body.editing #quickInput{display:none}#workflow{flex:1;min-height:0;margin:0;display:flex;flex-direction:column;overflow:hidden}#workflowBack{align-self:flex-start;padding:8px 0;font-size:13px}#workflowContent{flex:1;min-height:0;overflow:auto}.workflow-buttons button{font-size:12px;padding:10px}#workflowInput{flex-wrap:wrap}#workflowInput .actions{margin:0}#workflowInput .actions button{font-size:12px;padding:10px}#workflowInput textarea{flex:1}#workflowInput input{margin:0;font-size:12px;padding:5px}body.editing{position:static;top:0!important}body.editing .app-tools{display:flex}body.editing nav{display:flex}body.editing #search,body.editing .heading,body.editing #list{display:none}body.editing #editor{position:static;transform:none;max-width:none;inset:auto;width:100%;height:auto;flex:1;min-height:0;padding:0;overflow:hidden;transition:none}#editorBack{font-size:13px;padding:8px 0}#editor h2{font-size:20px;margin:4px 0 10px}#editor .editor-scope{display:none}#editor textarea{order:10;flex:1;font-size:16px}#editor #schedule{order:5}#editor #attachmentLabel{order:8}#editor .actions{order:11}#editor #attachmentSelected{max-height:90px}.attachment-buttons button{font-size:11px;padding:9px 5px}body.editing #status{position:static;padding:5px;margin:0}#editor #schedule label{font-size:12px}@media(min-width:700px){main{grid-template-columns:160px minmax(0,1fr);padding:14px;gap:16px}nav button,.more-options button{font-size:14px;text-align:left;padding:13px}#moreMenu .more-toggle{text-align:left}.workspace-content{max-width:900px;width:100%}}

main{height:var(--workspace-height,100dvh)}

.heading-tools{display:flex;align-items:center;gap:6px}#searchToggle{padding:9px;width:36px;height:36px;background:#e8eee7;font-size:16px;flex-shrink:0}#search{margin-bottom:8px}
.date-choice{width:100%;padding:12px;text-align:left;background:#e8eee7;border:1px solid #d3dfd2;font-size:14px}#workflowDatePick{flex-basis:100%}.date-overlay{position:fixed;inset:0;z-index:50;background:#183d3555;display:flex;align-items:center;justify-content:center;padding:12px;animation:dateFade .18s ease}.date-panel{background:#f8faf7;border-radius:22px;padding:18px;width:100%;max-width:360px;max-height:95%;overflow:auto;box-shadow:0 15px 50px #142e3533;animation:dateRise .22s cubic-bezier(.2,.7,.3,1)}.date-panel h3{font-size:18px;margin:0 0 14px}.calendar-toolbar{display:flex;align-items:center;justify-content:space-between;gap:5px;margin-bottom:8px}.calendar-toolbar strong{text-transform:capitalize;font-size:14px}.calendar-toolbar button{font-size:23px;padding:3px 13px}.calendar-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:3px}.calendar-grid>span{text-align:center;font-size:11px;color:#7c887b;padding:7px 0}.calendar-grid button{padding:9px 0;font-size:14px;background:transparent;border-radius:50%;transition:background .15s,color .15s,transform .15s}.calendar-grid button:active{transform:scale(.9)}.calendar-grid button.selected-day{background:#245d48;color:white}.calendar-grid button.today{box-shadow:inset 0 0 0 1px #9aaf9b}.calendar-grid button:disabled{opacity:.3}.time-choice{display:flex;gap:12px;justify-content:center;margin:16px 0}.time-pair{display:flex;align-items:center;gap:5px}.time-pair select{width:65px;text-align:center;font-size:20px;padding:8px;border-radius:12px;background:white}.time-chips{display:flex;gap:5px;flex-wrap:wrap;margin:8px 0}.time-chips button{font-size:13px;padding:8px}.date-actions{display:flex;gap:8px;margin-top:12px}.date-actions button{flex:1}.date-actions .primary{background:#245d48;color:white}.date-error{color:#9d453c;font-size:13px;margin:5px 0}.date-error:empty{display:none}@keyframes dateFade{from{opacity:0}to{opacity:1}}@keyframes dateRise{from{opacity:0;transform:translateY(14px) scale(.98)}to{opacity:1;transform:none}}@media(prefers-reduced-motion:reduce){.date-overlay,.date-panel{animation:none}.calendar-grid button{transition:none}}

.date-overlay.closing{opacity:0;transition:opacity .14s ease;pointer-events:none}.date-overlay.closing .date-panel{transform:translateY(10px);transition:transform .14s ease}@media(prefers-reduced-motion:reduce){.date-overlay.closing,.date-overlay.closing .date-panel{transition:none}}

/* Keep focus inside the narrow workspace and soften keyboard reflow. */
.workspace-content input,.workspace-content textarea,.workspace-content select{min-width:0;max-width:100%;outline:none;-webkit-tap-highlight-color:transparent;transition:border-color .16s ease,box-shadow .16s ease}
.workspace-content input:focus,.workspace-content textarea:focus,.workspace-content select:focus{border-color:#4d927a;box-shadow:inset 0 0 0 1px #4d927a}
.chat-compose:focus-within,#workflowInput:focus-within{border-color:#4d927a;box-shadow:inset 0 0 0 1px #4d927a}
.chat-compose textarea:focus,#workflowInput textarea:focus{box-shadow:none}
main{transition:height 220ms cubic-bezier(.2,.7,.3,1)}
nav button,.switch button{transition:background-color .18s ease,color .18s ease,box-shadow .18s ease}
@media(prefers-reduced-motion:reduce){main,nav button,.switch button,.workspace-content input,.workspace-content textarea,.workspace-content select{transition:none}}

/* Small disclosures share the same restrained motion. */
.more-options{overflow:hidden}#moreMenu .more-toggle{border-radius:10px;transition:background-color .18s ease}#moreMenu[open] .more-toggle{background:#e8eee7}
button{transition:background-color .18s ease,color .18s ease,opacity .18s ease}button:active{filter:brightness(.96)}
.file-preview{animation:dateFade .18s ease}
@media(prefers-reduced-motion:reduce){button,#moreMenu .more-toggle{transition:none}.file-preview{animation:none}}

.gesture-card .record-actions,.gesture-card>button{display:none}.gesture-card{touch-action:pan-y;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;transform:translateX(var(--swipe-x,0px));transition:transform .18s ease;position:relative}.gesture-card:focus-visible{outline:none;box-shadow:inset 0 0 0 2px #4d927a}
.card-menu-overlay{position:fixed;inset:0;z-index:60;background:#183d3555;display:flex;align-items:flex-end;justify-content:center;padding:12px 12px max(12px,env(safe-area-inset-bottom));animation:dateFade .18s ease}.card-menu-sheet{width:100%;max-width:420px;background:#f8faf7;border-radius:22px;padding:18px;display:flex;flex-direction:column;gap:8px;max-height:85dvh;overflow:auto;animation:dateRise .22s cubic-bezier(.2,.7,.3,1)}.card-menu-sheet h3{margin:0 0 8px;font-size:18px}.card-menu-sheet button{text-align:left;padding:14px}.card-menu-sheet .delete{background:#f8eeeb;color:#a34436}.card-menu-overlay.closing{opacity:0;transition:opacity .16s ease;pointer-events:none}.card-menu-overlay.closing .card-menu-sheet{transform:translateY(14px);transition:transform .16s ease}@media(prefers-reduced-motion:reduce){.gesture-card,.card-menu-overlay,.card-menu-sheet,.card-menu-overlay.closing,.card-menu-overlay.closing .card-menu-sheet{animation:none;transition:none}}

.gesture-card.swiping{transition:none;border-color:#c97e70;box-shadow:90px 0 0 #f8eeeb}

[hidden]{display:none!important}.browser-login{max-width:420px;margin:12vh auto;padding:28px;text-align:center}.browser-login p{line-height:1.5}.login-code{display:block;font-size:32px;letter-spacing:6px;margin:24px}.login-link{display:block;background:#245c49;color:white;padding:16px;border-radius:16px;text-decoration:none}#browserLogout{font-size:12px}

/* Keep controls below the iOS status bar in the Home Screen app. */
main{padding-top:calc(14px + env(safe-area-inset-top,0px))}main>.app-tools{padding-top:4px}.browser-login{padding-top:calc(28px + env(safe-area-inset-top,0px))}

/* Prevent accidental double-tap zoom and iOS input-focus zoom. */
html{touch-action:manipulation;-webkit-text-size-adjust:100%;text-size-adjust:100%}input,textarea,select,#search,#workflowInput input,#workflowInput textarea,#editor #schedule input,#editor #schedule select{font-size:16px}

#sharedHelp{flex-shrink:0;background:#e7eee8;border-radius:12px;padding:10px 12px;margin:2px 0 8px;font-size:12px;line-height:1.45}#sharedHelp p{margin:0 0 7px}#sharedHelp button{padding:8px 10px;background:white;font-size:12px}body.editing #sharedHelp,body.workflow-open #sharedHelp{display:none}

/* Compact navigation keeps more space for records on phones. */
@media(max-width:699px){main{grid-template-columns:72px minmax(0,1fr);gap:9px}nav{padding-right:5px}nav button{font-size:10px;padding:10px 2px}nav #moreMenu .more-toggle{padding:13px 2px}.heading{gap:5px}.heading h2{font-size:18px;min-width:0;overflow-wrap:anywhere}.heading #add{width:36px;height:36px;padding:0;font-size:26px;flex-shrink:0}.heading #searchToggle{width:36px;height:36px;padding:6px;flex-shrink:0}}.settings-logout{width:100%;margin-top:12px;background:#f8eeeb;color:#a34436}

/* Restore readable sidebar labels. */
@media(max-width:699px){main{grid-template-columns:82px minmax(0,1fr);gap:10px}nav{min-width:0;padding-right:8px}nav button{min-width:0;max-width:100%;white-space:normal;overflow-wrap:anywhere;font-size:10px;padding:10px 3px;line-height:1.4}}

@media(max-width:699px){main{grid-template-columns:110px minmax(0,1fr);gap:9px}nav{padding-right:5px}nav button{white-space:nowrap;overflow-wrap:normal;font-size:10px;padding:10px 2px}nav #moreMenu .more-toggle{white-space:nowrap}}

.gesture-card>.pin-action{display:none}.card.pinned .meta::before{content:'📌 ';}.active-reminder.pinned>p::before{content:'📌 ';}

.swipe-actions{display:none;gap:6px;margin:-2px -2px 12px}.swipe-open .swipe-actions{display:flex;animation:dateFade .18s ease}.swipe-actions button{flex:1;min-width:0;font-size:11px;padding:10px 4px;border-radius:12px;color:white}.swipe-actions .move{background:#7773ed}.swipe-actions .delete{background:#ed454f}.gesture-card.swipe-open{transform:none}.swipe-actions~p{transition:opacity .18s ease}

body.tickets-open .heading{display:flex}body.tickets-open #list,body.tickets-open #sharedHelp,body.tickets-open #quickInput{display:none}body.tickets-open #workflowContent>.card{margin-top:8px}

/* Anchor the workspace to the visible iOS viewport while the keyboard is open. */
html,body{position:fixed;inset:0;width:100%;height:100%;overflow:hidden;overscroll-behavior:none}main{position:absolute;top:var(--viewport-top,0px);left:0;right:0;width:100%;min-height:0}body.editing{position:fixed;inset:0;top:0!important}body.keyboard-open main{transition:none}nav{min-height:0;overscroll-behavior:contain}#moreMenu{flex:none}#moreMenu .more-toggle{display:block;list-style:none}#moreMenu .more-toggle::marker{content:''}#moreMenu .more-toggle::-webkit-details-marker{display:none}body.editing #editor{min-height:0}#editor textarea{min-height:60px}#editor .actions{flex-shrink:0}#ticketSchedule{flex-shrink:0;order:6}

/* No native disclosure marker or scroll indicator in the sidebar. */
nav{scrollbar-width:none}nav::-webkit-scrollbar{display:none;width:0;height:0}#moreMenu .more-toggle{display:block;width:100%;background:transparent;text-align:center;border:0;list-style:none}#moreMenu .more-toggle::before,#moreMenu .more-toggle::after{content:none}#moreMenu[open] .more-toggle{background:#e8eee7}

/* Prevent Safari focus/compositor overflow from exposing adjacent controls. */
.workspace-content{isolation:isolate;contain:paint;background:#f5f7f3;overflow-x:clip;transform:none}nav{isolation:isolate;contain:paint;background:#f5f7f3;overflow-x:hidden}.heading{min-width:0;width:100%}.heading h2{flex:1;min-width:0;overflow-wrap:anywhere}.heading-tools{flex-shrink:0}#editor{position:static;inset:auto;transform:none;height:auto;width:100%;max-width:none;margin:0}#editor[hidden],#workflow[hidden],#workflowInput[hidden],#browserLogin[hidden]{display:none!important;visibility:hidden;pointer-events:none}#search{max-width:100%;min-width:0}

#moreMenu .more-toggle.active,#moreMenu[open] .more-toggle.active{background:#245d48;color:white}

.panel-loading{padding:14px 0;color:#788376;font-size:13px}.loading-row{height:42px;margin-top:12px;border-radius:12px;background:linear-gradient(90deg,#e7ede5 20%,#f9fbf7 50%,#e7ede5 80%);background-size:200% 100%;animation:loadingShimmer 1.2s ease-in-out infinite}@keyframes loadingShimmer{from{background-position:100% 0}to{background-position:-100% 0}}@media(prefers-reduced-motion:reduce){.loading-row{animation:none}}

.city-picker{padding:10px 0}.city-results{display:flex;flex-direction:column;gap:6px;margin-top:10px}.city-results button{text-align:left;padding:12px;font-size:14px}

/* Utility controls stay at the bottom of the sidebar. */
nav{flex-wrap:nowrap}nav>.nav-utilities{margin-top:auto;padding-top:16px;display:flex;justify-content:center;gap:6px;flex-shrink:0}nav .nav-utilities button{flex:0 0 44px;width:44px;height:44px;padding:0;font-size:22px;line-height:1;display:flex;align-items:center;justify-content:center;border-radius:13px;background:#e8eee7}nav .nav-utilities button.active{background:#245d48;color:white}

.push-status{font-size:13px;line-height:1.5;color:#627368;margin-bottom:12px}.push-actions{display:flex;flex-direction:column;gap:8px}.push-actions button{font-size:13px}

/* Ticket fields remain reachable above the keyboard. */
body.ticket-editing #editor{overflow-y:auto;overflow-x:hidden;touch-action:pan-y;overscroll-behavior:contain;scroll-padding:8px}
body.ticket-editing #editor #text{order:3;flex:0 0 88px;height:88px;min-height:88px;margin:4px 0 8px}
body.ticket-editing #ticketSchedule{order:4;margin:4px 0 8px;font-size:12px}
body.ticket-editing #ticketDatePick{display:flex;align-items:center;width:100%;min-height:42px;padding:10px 12px;font-size:13px;border:1px solid #dce4d8;border-radius:12px;background:white}
body.ticket-editing #editor #attachmentLabel{order:5;margin:4px 0 8px;flex-shrink:0}
body.ticket-editing .attachment-buttons{gap:6px}
body.ticket-editing #attachmentPhotoPick,body.ticket-editing #attachmentPick{min-width:0;display:flex;align-items:center;justify-content:center;min-height:42px;padding:10px 6px;font-size:12px;white-space:nowrap;border:1px solid #dce4d8;border-radius:12px;background:white}
body.ticket-editing #editor .actions{order:6;position:static;padding:0;margin:8px 0;flex-shrink:0}
body.ticket-editing #save{min-height:44px;padding:10px;font-size:15px}
body.ticket-editing #editor h2{font-size:20px;margin:4px 0 8px}
body.ticket-editing #attachmentSelected{overflow:auto;max-height:80px}
body.ticket-editing.keyboard-open #editorBack{padding:5px 0}

/* Swipe actions replace the card content without shifting the list. */
.gesture-card.swipe-open{height:var(--swipe-card-height);padding:0;border:0;background:transparent;box-shadow:none}
.gesture-card.swipe-open>:not(.swipe-actions){display:none!important}
.gesture-card.swipe-open>.swipe-actions{height:100%;margin:0;gap:6px;align-items:stretch}
.swipe-open .swipe-actions button{margin:0;border-radius:13px;font-size:11px;padding:8px 3px;min-width:0}
.swipe-open .swipe-actions .swipe-return{flex:0 0 26px;background:white;border:1px solid #e4e9df;padding:0}

/* Action labels are controls, not selectable document text on iOS. */
.card-menu-overlay,.card-menu-overlay *{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
.card-menu-sheet{gap:7px;padding:16px;border:1px solid #ffffffd9;box-shadow:0 12px 40px #244b3524;background:linear-gradient(150deg,#fffffff5,#f4f8f3f5)}
.card-menu-sheet h3{font-size:17px;margin:0 0 7px}
.card-menu-sheet button{min-height:44px;padding:11px 13px;font-size:15px;border:1px solid #ffffffad;background:linear-gradient(145deg,#eef4ef,#e5eee6)}
.card-menu-sheet button.delete{background:#faeeec;border-color:#fff5f3}

/* Forms keep their minimum field sizes; small keyboard viewports scroll. */
body.editing #editor{overflow-y:auto;overflow-x:hidden;touch-action:pan-y;overscroll-behavior:contain;gap:8px;padding-bottom:4px;scroll-padding:8px}
body.editing #editor #schedule{flex:0 0 auto;display:flex;flex-direction:column;gap:8px;overflow:visible;margin:0}
body.editing #editor #schedule label{margin:0;flex:none}
body.editing #editor #text{flex:1 0 88px;min-height:88px;margin:0}
body.editing #editor .actions{position:static;flex:0 0 auto;margin:4px 0 0;padding:0}
body.editing #editor h2{margin:2px 0 4px;line-height:1.25}
body.ticket-editing #editor #text{flex:0 0 88px;margin:0}

/* Bounded transitions inside the workspace; viewport resizing stays immediate. */
.date-overlay,.card-menu-overlay{animation-duration:240ms}
.date-panel,.card-menu-sheet{animation-duration:300ms;animation-timing-function:cubic-bezier(.16,1,.3,1)}
.date-overlay.closing,.card-menu-overlay.closing{transition-duration:160ms}
.swipe-open .swipe-actions{animation-duration:240ms}
@media(prefers-reduced-motion:reduce){.date-overlay,.card-menu-overlay,.date-panel,.card-menu-sheet,.swipe-open .swipe-actions{animation:none;transition:none}}

/* Follow keyboard viewport changes with a short, gentle layout transition. */
main,body.keyboard-open main{transition:height 180ms cubic-bezier(.2,.7,.3,1),top 180ms cubic-bezier(.2,.7,.3,1)}
body.viewport-turning main{transition:none}
body.editing #editor #text{transition:border-color .18s ease,box-shadow .18s ease}
@media(prefers-reduced-motion:reduce){main,body.keyboard-open main{transition:none}}

/* Text editors grow with content rather than filling all free space. */
body.editing #editor #text,body.ticket-editing #editor #text{flex:0 0 auto;height:88px;min-height:88px;max-height:none;resize:none;transition:height 160ms ease,border-color .18s ease,box-shadow .18s ease;line-height:1.5}
@media(prefers-reduced-motion:reduce){body.editing #editor #text{transition:none}}

/* Bottom compose follows the keyboard without delayed Safari focus scrolling. */
body.quick-typing main{top:0;transition:none}
body.quick-typing .chat-compose{position:relative;flex:0 0 auto;margin-bottom:0}
