:root{color-scheme:light;--font-sans:-apple-system,BlinkMacSystemFont,"SF Pro Text","SF Pro Display","Segoe UI",sans-serif;--color-page:#f5f5f7;--color-surface:#fff;--color-surface-subtle:#fbfbfd;--color-surface-muted:#e8e8ed;--color-text:#1d1d1f;--color-muted:#6e6e73;--color-border:#d2d2d7;--color-border-strong:#b9bbc0;--color-primary:#0071e3;--color-primary-hover:#0077ed;--color-primary-soft:#eaf4ff;--color-primary-text:#004e9f;--color-progress:#0a7f72;--color-progress-soft:#e6f4f1;--color-warning-bg:#fffaf0;--color-warning-border:#ead9a8;--color-danger:#b42318;--radius-sm:10px;--radius-md:14px;--radius-lg:20px;--radius-xl:28px;--shadow-sm:0 1px 2px rgba(0,0,0,.04),0 8px 22px rgba(0,0,0,.035);--shadow-md:0 16px 40px rgba(0,0,0,.1);font-family:var(--font-sans);line-height:1.5;font-weight:400;color:var(--color-text);background:var(--color-page)}*{box-sizing:border-box}html{font-size:16px;letter-spacing:0}body{margin:0;background:var(--color-page);color:var(--color-text);font-family:var(--font-sans);-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}a{color:var(--color-primary);text-underline-offset:.18em}button,input,select,textarea{font:inherit;letter-spacing:0}button{color:inherit}h1,h2,h3,p{overflow-wrap:anywhere}h1{margin:0 0 .5rem;font-size:2rem;line-height:1.12;font-weight:650}h2{margin:1.5rem 0 .75rem;font-size:1.25rem;line-height:1.2}h2,h3{font-weight:600}h3{font-size:1rem;line-height:1.25}main{min-height:100vh}.container{width:min(100%,980px);margin:0 auto;padding:1.25rem}.app-header,.staff-header{position:-webkit-sticky;position:sticky;top:0;z-index:20;background:hsla(0,0%,100%,.86);border-bottom:1px solid hsla(240,6%,83%,.76);-webkit-backdrop-filter:saturate(180%) blur(18px);backdrop-filter:saturate(180%) blur(18px)}.app-header-inner,.staff-header-inner{width:min(100%,980px);min-height:72px;margin:0 auto;padding:.75rem 1.25rem;display:flex;align-items:center;justify-content:space-between;gap:1rem}.app-logo-link,.staff-logo-link{display:inline-flex;align-items:center;min-width:0}.app-logo,.staff-logo{width:184px;height:48px;object-fit:contain;object-position:left center}.sign-out-link{border:0;background:transparent;color:var(--color-muted);padding:.25rem 0;font-size:.84rem;font-weight:400;cursor:pointer}.sign-out-link:hover{color:var(--color-text)}.sign-out-link:disabled{color:#a1a1a6;cursor:wait}.patient-staff-login-pill{display:inline-flex;align-items:center;min-height:30px;border-radius:980px;background:var(--color-surface-muted);color:var(--color-muted);padding:.36rem .7rem;font-size:.82rem;font-weight:500;line-height:1;text-decoration:none;white-space:nowrap}.patient-staff-login-pill:hover{color:var(--color-text);background:#dedee3}.patient-request-card{display:grid;grid-gap:1.2rem;gap:1.2rem;width:min(100%,720px);margin:0 auto}.patient-page-title{margin:0;font-size:1.58rem;line-height:1.14;font-weight:560}.patient-page-subtitle{margin:-.7rem 0 0;color:var(--color-muted);font-size:.92rem;line-height:1.42}.patient-details-form{display:grid;grid-gap:.9rem;gap:.9rem}.patient-details-form .patient-page-subtitle{margin:0}.patient-details-form .field{margin-bottom:0}.patient-section-title{margin:0 0 .85rem;font-size:1.08rem;line-height:1.25;font-weight:560}.patient-warning{display:grid;grid-template-columns:auto minmax(0,1fr);grid-gap:.58rem;gap:.58rem;align-items:start;margin-bottom:.9rem;border:1px solid var(--color-warning-border);border-radius:var(--radius-md);background:var(--color-warning-bg);padding:.68rem .78rem}.patient-warning-compact{margin:.35rem 0 0;border:0;background:transparent;padding:0}.patient-warning p{margin:0;color:#6f5a1f;font-size:.86rem;line-height:1.42}.patient-warning-icon{width:20px;height:20px;color:#92722c;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.patient-problem-recap{display:inline-flex;align-items:center;gap:.45rem;margin:-.1rem 0 .15rem;border-radius:980px;background:var(--color-surface-muted);color:var(--color-muted);padding:.34rem .62rem;font-size:.82rem;line-height:1}.patient-problem-recap span{color:var(--color-muted);font-weight:400}.patient-problem-recap strong{font-weight:600}.patient-form-error{margin:.85rem 0 0}.patient-form-actions{display:flex;align-items:center;justify-content:space-between;gap:.75rem;margin-top:1rem}.patient-back-button{border:0;background:transparent;color:var(--color-muted);padding:.45rem 0;font-size:.9rem;font-weight:400;cursor:pointer}.patient-back-button:hover{color:var(--color-text)}.status-update-row{display:flex;align-items:center;justify-content:space-between;gap:.75rem;margin-top:.75rem}.status-refresh-button{flex:0 0 auto;border:1px solid var(--color-border);border-radius:980px;background:var(--color-surface);color:var(--color-muted);padding:.38rem .7rem;font-size:.82rem;font-weight:500;line-height:1;cursor:pointer}.status-refresh-button:hover:not(:disabled){color:var(--color-text);background:var(--color-surface-muted)}.status-refresh-button:disabled{opacity:.62;cursor:wait}.status-progress{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-gap:0;gap:0;margin:1.15rem 0 .8rem;padding:0;list-style:none}.status-progress-step{position:relative;display:grid;justify-items:center;grid-gap:.42rem;gap:.42rem;color:var(--color-muted);font-size:.82rem;font-weight:500;text-align:center}.status-progress-step:after,.status-progress-step:before{content:"";position:absolute;top:6px;width:50%;height:2px;background:var(--color-border)}.status-progress-step:before{left:0}.status-progress-step:after{right:0}.status-progress-step:first-child:before,.status-progress-step:last-child:after{display:none}.status-progress-step.is-complete,.status-progress-step.is-current{color:var(--color-text)}.status-progress-step.is-complete:after,.status-progress-step.is-complete:before,.status-progress-step.is-current:before{background:var(--color-progress)}.status-progress-dot{position:relative;z-index:1;width:14px;height:14px;border:2px solid var(--color-border);border-radius:50%;background:var(--color-surface)}.status-progress-step.is-complete .status-progress-dot,.status-progress-step.is-current .status-progress-dot{border-color:var(--color-progress);background:var(--color-progress)}.status-progress-step.is-current .status-progress-dot{box-shadow:0 0 0 4px var(--color-progress-soft)}.status-progress-label{line-height:1.2}.status-clinic-card{display:grid;grid-template-columns:auto minmax(0,1fr);grid-gap:1rem;gap:1rem;align-items:center;margin:.75rem 0 1rem}.status-clinic-logo{width:138px;height:auto}.status-clinic-card p{margin:.2rem 0}.card{background:var(--color-surface);border:1px solid var(--color-border);border-radius:var(--radius-lg);padding:1.1rem;box-shadow:var(--shadow-sm)}.grid{display:grid;grid-gap:1rem;gap:1rem}.grid-2{grid-template-columns:repeat(2,minmax(0,1fr))}.btn{min-height:40px;border:1px solid transparent;border-radius:980px;padding:.62rem 1rem;cursor:pointer;font-weight:500;line-height:1.2;text-align:center;transition:background .14s ease,border-color .14s ease,color .14s ease,transform .14s ease}.btn:hover:not(:disabled){transform:translateY(-1px)}.btn-primary,.btn-primary:visited{background:var(--color-primary);color:#fff}.btn-primary:hover:not(:disabled){background:var(--color-primary-hover)}.btn-attention{border-color:var(--color-warning-border);background:var(--color-warning-bg);color:#6f5a1f}.btn-attention:visited{color:#6f5a1f}.btn-attention:hover:not(:disabled){background:#fff4d8}.btn-secondary{background:var(--color-surface-muted);color:var(--color-text)}.btn-secondary:hover:not(:disabled){background:#dedee3}.btn:disabled{opacity:.58;cursor:wait}.field{display:flex;flex-direction:column;gap:.35rem;margin-bottom:.9rem}input,select,textarea{width:100%;border:1px solid var(--color-border-strong);border-radius:var(--radius-md);background:var(--color-surface);color:var(--color-text);padding:.74rem .82rem;outline:none;transition:border-color .14s ease,box-shadow .14s ease}textarea{resize:vertical}input:focus,select:focus,textarea:focus{border-color:var(--color-primary);box-shadow:0 0 0 3px rgba(0,113,227,.14)}label{color:var(--color-text);font-weight:500}.error,label{font-size:.95rem}.error{color:var(--color-danger)}.notice{background:var(--color-warning-bg);border:1px solid var(--color-warning-border);padding:.9rem;border-radius:var(--radius-lg)}.muted,.timestamp-text{color:var(--color-muted)}.timestamp-text{margin:0;font-size:.9rem;font-weight:400;line-height:1.3}.timeline{display:flex;flex-direction:column;gap:.65rem;margin-top:.75rem}.timeline-item{border-left:2px solid var(--color-border);padding-left:.75rem;font-size:.9rem}.timeline-item strong{font-size:.9rem;font-weight:550}.timeline-item p{margin:.3rem 0 0;color:var(--color-muted);font-size:.88rem;line-height:1.4}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.status-page{min-height:100vh;padding:1.25rem}.status-shell{width:min(100%,760px);margin:0 auto}.status-page-card{background:var(--color-surface);border:1px solid var(--color-border);border-radius:var(--radius-xl);box-shadow:var(--shadow-sm);padding:1.35rem}.status-page-header{margin-bottom:1rem}.status-page-header h1{margin:0;font-size:1.55rem;line-height:1.16;font-weight:560}.status-page-header p{margin:0;color:var(--color-muted);font-size:.92rem}.status-current-section{border:1px solid #d7e9e5;border-radius:var(--radius-lg);background:linear-gradient(180deg,#fbfffe,#f4fbf9);box-shadow:0 1px 2px rgba(10,127,114,.04),0 10px 24px rgba(10,127,114,.06);padding:1.15rem}.status-current-message{max-width:620px;margin:0 0 1rem;color:var(--color-text);font-size:1.03rem;font-weight:500;line-height:1.42}.status-section{border-bottom:1px solid var(--color-border);padding:1.35rem 0 1.3rem}.status-clinic-section h2,.status-section h2{margin:0 0 .75rem;color:var(--color-text);font-size:.96rem;line-height:1.25;font-weight:560}.status-clinic-section{padding-top:1.25rem;color:var(--color-muted);font-size:.9rem;line-height:1.45}.status-clinic-section>p{margin:.35rem 0 0}.status-clinic-section .notice{margin-top:.65rem;border-radius:var(--radius-md);padding:.72rem .78rem;font-size:.86rem}.status-emergency-notice{color:var(--color-danger);font-size:.82rem;line-height:1.4}.status-page .timeline{gap:.55rem;margin-top:.7rem}.status-page .timeline-item{border-left-color:#e5e5ea;padding-left:.68rem;font-size:.84rem}.status-page .timeline-item strong{font-size:.84rem;font-weight:520}.status-page .timeline-item p{margin-top:.24rem;font-size:.83rem;line-height:1.38}.status-page .status-update-row{margin-top:.85rem}.status-page .status-refresh-button{padding:.34rem .62rem;font-size:.78rem}.email-preview-page{min-height:100vh;background:#f5f5f7;padding:1.25rem}.email-preview-shell{width:min(100%,1180px);margin:0 auto}.email-preview-header{margin-bottom:1.5rem}.email-preview-header h1{margin:0 0 .35rem;color:#1d1d1f;font-size:1.7rem;line-height:1.16;font-weight:600}.email-preview-header p{margin:0;color:#6e6e73;font-size:.94rem}.email-preview-list{display:grid;grid-gap:1.5rem;gap:1.5rem}.email-preview-card{background:#fff;border:1px solid #d2d2d7;border-radius:16px;padding:1.25rem;box-shadow:var(--shadow-sm)}.email-preview-card-header{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;margin-bottom:1rem}.email-preview-card-header h2{margin:0 0 .25rem;color:#1d1d1f;font-size:1.12rem;line-height:1.24;font-weight:600}.email-preview-card-header p{margin:0;color:#6e6e73;font-size:.9rem}.email-preview-badge{flex:0 0 auto;border-radius:980px;background:#e8e8ed;color:#6e6e73;padding:.32rem .58rem;font-size:.76rem;font-weight:500;line-height:1;text-transform:capitalize;white-space:nowrap}.email-preview-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-gap:1rem;gap:1rem}.email-preview-panel{display:grid;grid-gap:.55rem;gap:.55rem}.email-preview-panel h3{margin:0;color:#1d1d1f;font-size:.92rem;font-weight:560}.email-preview-frame,.email-preview-text{width:100%;min-height:520px;border:1px solid #d2d2d7;border-radius:16px;background:#f5f5f7}.email-preview-frame{height:520px}.email-preview-text{overflow:auto;margin:0;padding:1rem;color:#1d1d1f;background:#fff;font-size:.86rem;line-height:1.5;white-space:pre-wrap}.badge{display:inline-block;padding:.28rem .58rem;border-radius:980px;font-size:.8rem;background:var(--color-primary-soft);color:var(--color-primary-text);font-weight:500}.queue-page-title{margin-bottom:.25rem;font-size:1.45rem;line-height:1.18;font-weight:560}.queue-page-subtitle{margin:0;color:var(--color-muted);font-size:.92rem}.queue-toggle{display:inline-flex;gap:.15rem;margin:.85rem 0 .95rem;padding:.16rem;border:1px solid hsla(240,6%,83%,.72);border-radius:980px;background:#f1f1f4}.queue-toggle button{border:0;border-radius:980px;background:transparent;color:var(--color-muted);padding:.36rem .62rem;cursor:pointer;font-size:.86rem;font-weight:500}.queue-toggle button.active{background:var(--color-surface);color:var(--color-text);box-shadow:0 1px 2px rgba(0,0,0,.04)}.detail-page-shell{display:grid;grid-gap:1rem;gap:1rem}.detail-back-button{display:inline-grid;place-items:center;width:30px;height:30px;border:1px solid var(--color-border);border-radius:980px;background:var(--color-surface-subtle);color:var(--color-text);text-decoration:none;font-size:1rem;line-height:1}.detail-back-button:hover{background:var(--color-surface-muted)}.detail-page-header{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem}.detail-title-group{display:grid;grid-template-columns:30px minmax(0,1fr);grid-gap:.55rem;gap:.55rem;align-items:start;min-width:0}.detail-title-copy{min-width:0}.detail-page-title{margin-bottom:.25rem;font-size:1.45rem;line-height:1.18;font-weight:560}.detail-page-subtitle{margin:0;color:var(--color-muted);font-size:.92rem}.detail-summary-grid{display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);grid-gap:.9rem;gap:.9rem}.detail-panel{border:1px solid var(--color-border);border-radius:var(--radius-lg);background:var(--color-surface-subtle);padding:.95rem}.detail-panel-primary{background:var(--color-surface)}.detail-kicker{margin:0 0 .4rem;color:var(--color-muted);font-size:.78rem;font-weight:500;line-height:1.2}.detail-patient-name{margin:0;font-size:1.45rem;line-height:1.14;font-weight:650}.detail-contact-list{display:grid;grid-gap:.35rem;gap:.35rem;margin-top:.85rem;font-size:.95rem}.copy-status-link-button{justify-self:start;margin-top:.85rem;border:0;background:transparent;color:var(--color-primary);padding:0;font-size:.86rem;font-weight:500;cursor:pointer}.copy-status-link-button:hover{color:var(--color-primary-hover)}.detail-copy-actions{display:flex;flex-wrap:wrap;gap:.75rem}.email-failure-alert{display:grid;grid-gap:.15rem;gap:.15rem;border:1px solid var(--color-warning-border);border-radius:var(--radius-md);background:var(--color-warning-bg);color:#6f5a1f;padding:.75rem .85rem;font-size:.9rem;line-height:1.38}.email-failure-alert strong{color:var(--color-text);font-weight:600}.detail-list{display:grid;grid-gap:.65rem;gap:.65rem;margin:0}.detail-list div{display:grid;grid-gap:.08rem;gap:.08rem}.detail-list dt{color:var(--color-muted);font-size:.78rem;font-weight:500}.detail-list dd{margin:0;color:var(--color-text);font-size:.94rem;font-weight:450;text-transform:capitalize}.detail-list dd.timestamp-text{color:var(--color-muted);font-size:.9rem;font-weight:400;line-height:1.3;text-transform:none}.detail-section-title{margin:0 0 .75rem;font-size:1rem;line-height:1.25;font-weight:560}.detail-timeline-panel,.detail-workflow-panel{margin-top:0}.detail-workflow-panel{display:grid;grid-gap:.65rem;gap:.65rem}.detail-workflow-panel .detail-kicker{margin-bottom:0}.workflow-inline-notice{justify-self:start;margin:.1rem 0 0;border:0;background:transparent;padding:0;color:var(--color-muted);font-size:.84rem;line-height:1.3}.workflow-action-row{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;justify-content:space-between;grid-gap:.85rem;gap:.85rem}.workflow-action-row .btn{justify-self:end;min-width:142px}.workflow-contact-actions{justify-self:end;display:flex;flex-wrap:wrap;justify-content:flex-end;gap:.55rem}.workflow-action-row .workflow-contact-button{min-height:34px;min-width:auto;padding:.44rem .78rem;font-size:.84rem;font-weight:500}.workflow-action-row .request-status-pill{justify-self:start}.queue-board{display:grid;grid-template-columns:1fr;grid-gap:1rem;gap:1rem;align-items:start}.queue-column{min-width:0}.queue-column h2{margin-top:0}.queue-column[data-active=false]{display:none}.request-card{display:flex;flex-direction:column;gap:.65rem;background:var(--color-surface);border:1px solid var(--color-border);border-radius:var(--radius-lg);padding:.95rem;box-shadow:var(--shadow-sm)}.request-card-open{border-color:rgba(0,113,227,.2)}.request-card-title-row{display:flex;align-items:center;justify-content:space-between;gap:.85rem;min-width:0}.request-card h3{margin:0;color:var(--color-text);font-size:1.3rem;line-height:1.12;font-weight:650;min-width:0}.request-card p{margin:.35rem 0}.request-status-pill{flex:0 0 auto;display:inline-block;border-radius:980px;padding:.32rem .65rem;font-size:.78rem;font-weight:600;line-height:1;white-space:nowrap}.request-status-pill-received{background:var(--color-primary-soft);color:var(--color-primary-text)}.request-status-pill-reviewing{background:var(--color-warning-bg);color:#6f5a1f}.request-status-pill-resolved{background:var(--color-surface-muted);color:var(--color-muted)}.request-card-problem{color:var(--color-text);font-size:1rem;font-weight:500;text-transform:capitalize}.request-card-body{display:grid;grid-gap:.12rem;gap:.12rem}.email-failure-indicator{margin:.25rem 0 0;color:#6f5a1f;font-size:.82rem;font-weight:500}.request-card-timing{margin:0;flex:0 0 auto;text-align:right;white-space:nowrap}.request-card-action{display:flex;justify-content:flex-end;padding-top:.05rem}.request-open-button{white-space:nowrap}.problem-card{border:1px solid var(--color-border);border-radius:var(--radius-lg);padding:.95rem;cursor:pointer;background:var(--color-surface);min-height:118px;text-align:left;transition:border-color .14s ease,background .14s ease,box-shadow .14s ease,transform .14s ease}.problem-card-heading{display:flex;align-items:center;gap:.65rem;margin-bottom:.5rem}.problem-card-icon{flex:0 0 auto;width:24px;height:24px;color:var(--color-muted);stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.problem-card:hover{border-color:var(--color-border-strong);box-shadow:var(--shadow-sm);transform:translateY(-1px)}.problem-card:active{border-color:var(--color-primary);background:var(--color-primary-soft);transform:translateY(0)}.problem-card h3{margin:0}.problem-card p{margin:0;color:var(--color-muted)}.resolve-sheet{width:min(100%,720px);max-height:calc(100vh - 2rem);overflow:auto;border-radius:var(--radius-xl) var(--radius-xl) var(--radius-lg) var(--radius-lg);box-shadow:var(--shadow-md)}.outcome-option{display:flex;gap:.75rem;align-items:center;width:100%;min-height:52px;border:1px solid var(--color-border);border-radius:var(--radius-lg);padding:.85rem;background:var(--color-surface);cursor:pointer}.outcome-option.selected{border-color:var(--color-primary);background:var(--color-primary-soft)}.outcome-option input{width:auto}a.btn{display:inline-block;text-decoration:none}:focus-visible{outline:3px solid rgba(0,113,227,.34);outline-offset:2px}@media (max-width:640px){h1{font-size:1.7rem}.grid-2{grid-template-columns:1fr}.container,.status-page{padding:.75rem}.status-page-card{border-radius:var(--radius-lg);padding:1rem}.status-page-header h1{font-size:1.34rem}.status-current-section{padding:.9rem}.status-current-message{font-size:.97rem}.status-progress{margin-top:.95rem}.status-progress-step{font-size:.76rem}.status-page .status-update-row{gap:.5rem}.email-preview-page{padding:.75rem}.email-preview-card{padding:1rem}.email-preview-card-header{flex-direction:column}.email-preview-grid{grid-template-columns:1fr}.staff-header-inner{min-height:64px;padding:.6rem .75rem}.staff-logo{width:142px;height:42px}.patient-staff-login-pill{min-height:28px;padding:.32rem .58rem;font-size:.76rem}.patient-form-actions{align-items:stretch}.patient-form-actions .btn{min-width:0}.queue-toggle{display:flex;width:100%}.queue-toggle button{flex:1 1}.detail-page-header,.detail-summary-grid{grid-template-columns:1fr}.detail-page-header{display:grid}.request-card-action,.request-open-button{width:100%}.workflow-action-row{grid-template-columns:1fr;justify-items:start}.workflow-action-row .btn,.workflow-contact-actions{justify-self:stretch;width:100%}.workflow-contact-actions .btn{flex:1 1 140px}.status-update-row{align-items:flex-start;flex-direction:column}.status-clinic-card{grid-template-columns:1fr;gap:.75rem}.resolve-sheet{max-height:calc(100vh - 1rem)}}@media (min-width:768px){.resolve-sheet{margin:auto 0;border-radius:var(--radius-xl)}}