:root{--bg:#f6f6f3;--panel:#fff;--text:#1c1c1a;--muted:#73736e;--line:#e7e7e2;--soft:#efefe9}*{box-sizing:border-box}html,body{background:var(--bg);color:var(--text);margin:0;padding:0;font-family:ui-sans-serif,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}button,input,textarea{font:inherit}a{color:inherit}.shell{min-height:100vh;padding:20px}.topbar{justify-content:space-between;align-items:center;max-width:1200px;margin:0 auto 16px;display:flex}.brand{letter-spacing:.02em;font-size:22px;font-weight:600}.tag{color:var(--muted);font-size:13px}.grid{grid-template-columns:minmax(0,1fr) 360px;gap:16px;max-width:1200px;margin:0 auto;display:grid}.card{background:var(--panel);border:1px solid var(--line);border-radius:18px;overflow:hidden}.chat{flex-direction:column;min-height:72vh;display:flex}.messages{flex:1;padding:20px;overflow-y:auto}.msg{max-width:84%;margin-bottom:16px}.msg.user{margin-left:auto}.bubble{white-space:pre-wrap;border-radius:16px;padding:12px 14px;line-height:1.45}.user .bubble{color:#fff;background:#20201d;border-bottom-right-radius:5px}.luma .bubble{background:var(--soft);border-bottom-left-radius:5px}.composer{border-top:1px solid var(--line);gap:10px;padding:14px;display:flex}.composer textarea{resize:none;border:1px solid var(--line);background:#fff;border-radius:14px;flex:1;min-height:48px;padding:12px}.primary{color:#fff;cursor:pointer;background:#20201d;border:0;border-radius:14px;padding:0 18px}.side{padding:18px}.side h2{margin:0 0 6px;font-size:17px}.side p{color:var(--muted);margin-top:0;font-size:13px}.memory{border:1px solid var(--line);border-radius:14px;margin-top:10px;padding:12px}.memory .meta{color:var(--muted);margin-top:8px;font-size:12px}.memory-actions{gap:8px;margin-top:10px;display:flex}.secondary{border:1px solid var(--line);cursor:pointer;background:#fff;border-radius:10px;padding:7px 10px}.login{place-items:center;min-height:100vh;padding:20px;display:grid}.login-card{border:1px solid var(--line);background:#fff;border-radius:18px;width:min(420px,100%);padding:24px}.login-card input{border:1px solid var(--line);border-radius:12px;width:100%;margin-bottom:10px;padding:12px}.notice{color:var(--muted);font-size:13px}.topbar-actions{flex-wrap:wrap;justify-content:flex-end;gap:8px;display:flex}.email-dialog{border:1px solid var(--line);width:min(560px,100% - 32px);max-height:calc(100vh - 40px);color:var(--text);border-radius:18px;padding:24px;overflow:auto}.email-dialog::backdrop{background:#00000059}.email-heading{justify-content:space-between;align-items:center;gap:12px;display:flex}.email-heading h2{margin:0;font-size:22px}.email-provider{border:1px solid var(--line);border-radius:12px;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:12px;margin:16px 0;padding:16px;display:flex}.email-provider p{color:var(--muted);overflow-wrap:anywhere;margin:6px 0 0;font-size:13px}.email-badge{color:#246042;background:#eaf5ed;border-radius:20px;padding:5px 9px;font-size:12px}.email-dialog button:disabled{cursor:default;opacity:.55}.email-message{font-size:14px;line-height:1.5}button:focus-visible{outline-offset:3px;outline:2px solid #246042}@media (max-width:820px){.shell{padding:10px}.grid{grid-template-columns:1fr}.side-card{order:-1}.chat{min-height:66vh}.topbar{padding:2px 4px}}.medical-backdrop{z-index:100;background:#1b242b77;justify-content:center;align-items:center;padding:20px;display:flex;position:fixed;inset:0}.medical-dialog{width:100%;max-width:640px;max-height:90vh;padding:24px;overflow-y:auto}.medical-heading,.medical-actions{flex-wrap:wrap;align-items:center;gap:10px;display:flex}.medical-heading{justify-content:space-between}.medical-dialog input{border:1px solid #c8cecb;border-radius:8px;width:100%;margin:8px 0 12px;padding:10px;display:block}.medical-dialog p{line-height:1.5}.integration-doc{max-width:800px;margin:40px auto;padding:24px;line-height:1.65}.integration-doc a{overflow-wrap:anywhere}.app-shell{height:100dvh;min-height:100dvh;padding-bottom:max(20px, env(safe-area-inset-bottom));flex-direction:column;display:flex}.app-topbar{flex-shrink:0;gap:12px;width:100%}.app-nav{align-items:center;gap:6px;display:flex}.nav-item{min-height:44px;color:var(--muted);cursor:pointer;background:0 0;border:1px solid #0000;border-radius:12px;padding:10px 16px;font-weight:500}.nav-item:hover{background:var(--soft);color:var(--text)}.nav-item.active{background:var(--panel);border-color:var(--line);color:var(--text)}.settings-button{align-items:center;gap:8px;display:inline-flex}.settings-button svg{fill:none;stroke:currentColor;stroke-width:1.5px;stroke-linecap:round;stroke-linejoin:round;width:18px;height:18px}.app-content{flex:1;width:100%;max-width:1200px;min-height:0;margin:0 auto}.tab-panel[hidden]{display:none}.chat-panel{height:100%;min-height:0}.chat-panel .messages{overflow-wrap:anywhere;overscroll-behavior:contain;min-height:0}.chat-composer{border-top:0;flex-shrink:0;padding:14px;display:block}.composer-box{border:1px solid var(--line);background:var(--panel);border-radius:22px;padding:6px 10px 8px}.composer-box:focus-within{border-color:#b9b9b1;box-shadow:0 0 0 2px #1c1c1a0a}.chat-composer textarea{border:0;border-radius:0;outline:none;width:100%;min-height:64px;max-height:24dvh;padding:12px 6px;font-size:16px;line-height:1.5;display:block}.chat-composer textarea::placeholder{color:var(--muted);opacity:1}.composer-toolbar,.composer-tools{align-items:center;display:flex}.composer-toolbar{justify-content:space-between}.composer-tools{gap:6px}.composer-icon{width:44px;height:44px;color:var(--text);cursor:pointer;background:0 0;border:0;border-radius:50%;flex-shrink:0;place-items:center;padding:10px;display:inline-grid}.composer-icon svg{fill:none;stroke:currentColor;stroke-width:1.8px;stroke-linecap:round;stroke-linejoin:round;width:24px;height:24px}.composer-icon:disabled{cursor:default}.send-button{color:#fff;background:#377cf6}.send-button:disabled{color:#739ad9;background:#dce8fc}.section-panel{padding:24px}.section-panel h1{margin:0 0 24px;font-size:22px;font-weight:600}.connection-buttons{flex-wrap:wrap;gap:12px;display:flex}.section-panel>.secondary,.connection-buttons>.secondary{min-height:44px}@media (max-width:600px){.app-shell{padding:10px 10px max(10px, env(safe-area-inset-bottom))}.app-topbar{gap:4px;margin-bottom:10px;padding:0}.app-nav{gap:2px}.nav-item{padding:10px 12px;font-size:14px}.settings-button{gap:5px}.chat-panel .messages{padding:16px 12px}.chat-panel .msg{max-width:92%}.chat-composer{padding:8px}.composer-box{border-radius:18px}.section-panel{padding:20px}}@media (max-width:820px){.app-shell{padding-bottom:calc(74px + env(safe-area-inset-bottom,0px))}.app-topbar{justify-content:flex-end}.app-nav{z-index:20;min-height:64px;padding:8px 12px calc(8px + env(safe-area-inset-bottom,0px));background:var(--panel);border-top:1px solid var(--line);grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;display:grid;position:fixed;inset:auto 0 0}.app-nav .nav-item{min-height:48px;padding:10px 16px}.app-nav .nav-item.active{background:var(--soft);border-color:#0000}}.settings-close{border:1px solid var(--line);background:var(--panel);width:44px;height:44px;color:var(--text);cursor:pointer;border-radius:50%;place-items:center;padding:10px;display:inline-grid}.settings-close svg,.settings-row>svg{fill:none;stroke:currentColor;stroke-width:1.8px;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0;width:24px;height:24px}.settings-close:hover{background:var(--soft)}.settings-panel{overscroll-behavior:contain;background:var(--bg);border-radius:18px;height:100%;overflow-y:auto}.settings-group{margin:0 0 28px}.settings-group h2{color:var(--muted);margin:0 14px 10px;font-size:17px;font-weight:600}.settings-group-items{border:1px solid var(--line);background:var(--panel);border-radius:20px;overflow:hidden}.settings-row{width:100%;min-height:60px;color:var(--text);text-align:left;cursor:pointer;background:0 0;border:0;align-items:center;gap:16px;padding:16px 18px;font-size:17px;display:flex}.settings-row+.settings-row{border-top:1px solid var(--line)}.settings-row:hover{background:var(--soft)}.settings-sign-out{color:#c6352b}@media (max-width:600px){.settings-panel{padding:16px 8px}}
.history-topbar-actions{align-items:center;gap:4px;display:flex}.history-trigger{align-items:center;gap:7px;display:inline-flex}.history-trigger svg{fill:none;stroke:currentColor;stroke-width:1.7px;stroke-linecap:round;stroke-linejoin:round;width:19px;height:19px}.history-dialog{background:var(--bg);width:100%;max-width:none;height:100dvh;max-height:none;color:var(--text);border:0;margin:0;padding:0;position:fixed;inset:0;overflow:hidden}.history-dialog::backdrop{background:#f6f6f3}.history-shell{flex-direction:column;max-width:760px;height:100%;margin:auto;display:flex}.history-header{padding:max(12px, env(safe-area-inset-top)) 16px 10px;flex-shrink:0;justify-content:space-between;align-items:center;gap:12px;display:flex}.history-header-title{align-items:center;gap:8px;min-width:0;display:flex}.history-header h1{overflow-wrap:anywhere;margin:0;font-size:22px;font-weight:600;line-height:1.25}.history-icon-button{color:var(--text);cursor:pointer;background:0 0;border:0;border-radius:12px;flex-shrink:0;width:44px;height:44px;font-size:28px}.history-icon-button:hover{background:var(--soft)}.history-demo-bar{color:#66665d;background:#eeeee7;flex-wrap:wrap;flex-shrink:0;justify-content:space-between;align-items:center;gap:6px;padding:7px 20px;font-size:11px;display:flex}.history-demo-state{align-items:center;gap:5px;display:flex}.history-demo-state select{color:inherit;min-height:30px;font:inherit;background:#f7f7f2;border:1px solid #d5d5cc;border-radius:6px;padding:3px}.history-content{overscroll-behavior:contain;flex:1;min-height:0;padding:22px 20px 28px;overflow-y:auto}.history-all{border:1px solid var(--line);width:min(190px,70%);min-height:48px;color:var(--text);cursor:pointer;background:#fff;border-radius:14px;margin:0 auto 24px;font-size:18px;font-weight:500;display:block}.history-all.active,.history-category.active{background:#e9ebdf;border-color:#848679}.history-category-grid{border-top:1px solid var(--line);grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding-top:22px;display:grid}.history-category{border:1px solid var(--line);min-height:76px;color:var(--text);cursor:pointer;overflow-wrap:anywhere;background:#fff;border-radius:16px;place-items:center;padding:16px 8px;font-size:17px;display:grid}.history-start-hint{color:var(--muted);text-align:center;max-width:300px;margin:30px auto;font-size:14px;line-height:1.6}.history-list-heading{justify-content:space-between;align-items:baseline;gap:10px;margin:26px 0 12px;display:flex}.history-list-heading h2{margin:0;font-size:18px;font-weight:600}.history-list-heading>span{color:var(--muted);font-size:12px}.history-topic-card{text-align:left;border:1px solid var(--line);width:100%;color:var(--text);cursor:pointer;background:#fff;border-radius:16px;flex-direction:column;gap:8px;margin-bottom:12px;padding:18px;line-height:1.5;display:flex}.history-topic-card>strong{font-size:19px;font-weight:600}.history-topic-card>span{font-size:14px}.history-topic-card:hover{border-color:#bcbeb2}.history-topic-category{color:#646d4c;margin:0 0 6px;font-weight:600;font-size:12px!important}.history-topic-description{color:var(--muted);margin:0 0 22px;line-height:1.5}.history-muted{color:var(--muted);font-size:12px;line-height:1.5}.history-date-tools{flex-wrap:wrap;align-items:flex-end;gap:10px;margin-bottom:18px;display:flex}.history-date-tools label,.history-move label{color:var(--muted);flex-direction:column;gap:5px;min-width:0;font-size:12px;display:flex}.history-date-tools input,.history-date-tools select,.history-move input,.history-move select{border:1px solid var(--line);min-height:44px;font:inherit;color:var(--text);background:#fff;border-radius:10px;min-width:0;max-width:100%;padding:8px;font-size:16px}.history-actions{flex-wrap:wrap;gap:8px;margin-bottom:20px;display:flex}.history-actions button,.history-selection button,.history-action-card>.secondary{min-height:44px}.history-segment{border:1px solid var(--line);background:#fff;border-radius:16px;margin:14px 0;overflow:hidden}.history-segment.is-selected{border-color:#6d765c;box-shadow:0 0 0 1px #6d765c}.history-segment-heading{align-items:flex-start;gap:10px;padding:16px;display:flex}.history-segment-toggle{min-width:0;color:var(--text);text-align:left;cursor:pointer;background:0 0;border:0;flex-direction:column;flex:1;gap:8px;padding:0;line-height:1.5;display:flex}.history-segment-toggle strong{font-size:16px;font-weight:500}.history-check{appearance:none;cursor:pointer;background:#fff;border:1.5px solid #a9aea0;border-radius:50%;flex-shrink:0;width:26px;height:26px;margin:2px 2px 0 0}.history-check:checked{border:7px solid #65704f}.history-check:focus-visible{outline-offset:4px;outline:2px solid #246042}.history-segment-text{border-top:1px solid var(--line);padding:16px}.history-exchange{margin-bottom:20px}.history-exchange time{color:var(--muted);font-size:11px}.history-exchange p{background:var(--soft);white-space:pre-wrap;border-radius:12px;margin:8px 0;padding:12px;font-size:14px;line-height:1.6}.history-exchange p strong{color:var(--muted);margin-bottom:5px;font-size:11px;display:block}.history-exchange p:first-of-type{background:#f7f7f3}.history-source-link{color:#556047;text-underline-offset:3px;cursor:pointer;background:0 0;border:0;min-height:44px;padding:10px 0;font-size:13px;text-decoration:underline}.history-action-card,.history-selection{background:#eff1e9;border:1px solid #d6dacc;border-radius:16px;margin-bottom:18px;padding:16px}.history-action-card h2{margin:0 0 14px;font-size:17px}.history-option{text-align:left;border:1px solid var(--line);width:100%;color:var(--text);cursor:pointer;background:#fff;border-radius:12px;flex-direction:column;gap:6px;margin-bottom:10px;padding:14px;display:flex}.history-option span{color:var(--muted);font-size:12px}.history-selection-heading{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:8px;display:flex}.history-selection-heading>div{gap:6px;display:flex}.history-selection-heading strong{font-size:14px}.history-confirm{min-height:44px;margin-top:14px;padding:10px 16px}.history-confirm:disabled{opacity:.45;cursor:default}.history-move{gap:12px;margin-top:16px;display:grid}.history-feedback{color:#46543a;background:#e8eddf;border-radius:12px;padding:12px 14px;font-size:13px;line-height:1.5}.history-feedback button{color:inherit;cursor:pointer;background:0 0;border:0;min-height:44px;text-decoration:underline}.history-state{text-align:center;padding:30px 8px}.history-state h2{font-size:18px;font-weight:500}.history-state p{color:var(--muted);font-size:14px;line-height:1.6}.history-state button{min-height:44px}.history-search-area{padding:10px 16px calc(12px + env(safe-area-inset-bottom,0px));border-top:1px solid var(--line);background:var(--bg);flex-shrink:0}.history-search-scope{color:var(--muted);margin:0 4px 6px;font-size:11px;display:block}.history-search-box{background:#fff;border:1px solid #d3d5c9;border-radius:18px;align-items:flex-end;gap:8px;padding:9px;display:flex}.history-search-box textarea{resize:none;width:100%;min-width:0;color:var(--text);border:0;border-radius:8px;outline:0;padding:7px;font-size:16px;line-height:1.4}.history-search-box:focus-within{outline-offset:1px;outline:2px solid #b5bda8}.history-export-preview h2{font-size:18px}.history-export-preview textarea{border:1px solid var(--line);border-radius:12px;width:100%;height:48dvh;min-height:180px;margin:10px 0;padding:14px;font-size:14px;line-height:1.6}.history-search-snippet{border-left:2px solid #bec7ad;padding-left:10px}@media (max-width:380px){.history-content{padding:16px 12px 24px}.history-category{font-size:15px}.history-date-tools{grid-template-columns:repeat(2,minmax(0,1fr));display:grid}.history-selection-heading>div{width:100%}}.history-category-menu{flex-shrink:0;align-self:center;position:relative}.history-category-menu summary{border:1px solid var(--line);width:44px;height:44px;color:var(--text);cursor:pointer;background:#fff;border-radius:12px;place-items:center;font-size:25px;line-height:1;list-style:none;display:grid}.history-category-menu summary::-webkit-details-marker{display:none}.history-category-menu summary:focus-visible{outline-offset:3px;outline:2px solid #246042}.history-category-options{z-index:30;border:1px solid var(--line);background:#fff;border-radius:14px;width:210px;max-width:calc(100vw - 40px);padding:6px;position:absolute;top:calc(100% + 6px);right:0;box-shadow:0 10px 30px #0000001f}.history-category-options button{width:100%;min-height:44px;color:var(--text);text-align:left;cursor:pointer;background:0 0;border:0;border-radius:8px;padding:10px 12px;font-size:15px;display:block}.history-category-options button:hover,.history-category-options button:focus-visible{background:var(--soft)}.history-category-options button.is-destructive{color:#a13434}.history-category-options hr{background:var(--line);border:0;height:1px;margin:5px 6px}
.connections-panel{overscroll-behavior:contain;height:100%;overflow-y:auto}.connections-heading{justify-content:space-between;align-items:center;gap:12px;margin-bottom:22px;display:flex}.section-panel .connections-heading h1{margin:0}.connections-new{border:1px solid var(--line);min-height:44px;color:var(--text);cursor:pointer;white-space:nowrap;background:#fff;border-radius:12px;justify-content:center;align-items:center;gap:7px;padding:8px 12px;font-size:14px;display:inline-flex}.connections-new>span{font-size:22px;font-weight:400;line-height:1}.connections-filters{flex-wrap:wrap;gap:8px;margin-bottom:22px;display:flex}.connections-filter{border:1px solid var(--line);min-height:44px;color:var(--muted);cursor:pointer;background:#fff;border-radius:22px;padding:9px 16px;font-size:14px}.connections-filter.active{color:var(--text);background:#e9ebdf;border-color:#d1d6c2}.connections-tab-dot{vertical-align:middle;background:#bf3c3c;border-radius:50%;width:8px;height:8px;margin-left:7px;display:inline-block}.connections-list{gap:14px;margin:0;padding:0;list-style:none;display:grid}.connection-card{border:1px solid var(--line);background:#fff;border-radius:16px;padding:18px}.connection-card.needs-attention{border-color:#dfaaaa}.connection-card-heading{align-items:flex-start;gap:12px;display:flex}.connection-type-icon{color:#898c85;background:#f0f0ec;border-radius:12px;flex-shrink:0;place-items:center;width:40px;height:40px;display:inline-grid}.connection-type-icon.is-connected{color:#267344;background:#eaf5ed}.connection-type-icon svg{width:23px;height:23px}.connection-name{flex-direction:column;flex:1;gap:5px;min-width:0;line-height:1.45;display:flex}.connection-name strong{font-size:16px;font-weight:600}.connection-name>span{color:var(--muted);overflow-wrap:anywhere;font-size:13px}.connection-name .connection-test-label{color:#77704f;font-size:11px}.connection-card-footer{justify-content:space-between;align-items:center;gap:12px;margin-top:18px;display:flex}.connection-card-footer>div{flex-direction:column;gap:5px;display:flex}.connection-status{color:#426047;font-size:13px}.connection-status.attention{color:#a52f2f}.connection-status.disconnected{color:var(--muted)}.connection-card-footer>.connection-card-actions{flex-direction:row;gap:6px;display:flex}.connection-date{color:var(--muted);font-size:11px}.connection-card-footer button{min-height:44px}.connection-alert,.connections-attention-note>span{color:#a52f2f;background:#faeaea;border-radius:50%;flex-shrink:0;place-items:center;width:24px;height:24px;font-weight:700;display:inline-grid}.connections-attention-note{color:#a52f2f;align-items:center;gap:9px;margin:0 0 20px;font-size:13px;line-height:1.5;display:flex}.connections-error{background:#faf6eb;border:1px solid #e6d5b2;border-radius:12px;margin-bottom:16px;padding:14px;font-size:13px;line-height:1.5}.connections-error p{margin:0 0 12px}.connections-empty{text-align:center;color:var(--muted);padding:32px 8px;font-size:14px;line-height:1.6}.connections-empty h2{color:var(--text);font-size:18px;font-weight:500}.connections-existing-flows>button{display:none}.connections-chooser{border:1px solid var(--line);width:min(460px,100% - 24px);color:var(--text);background:#fff;border-radius:20px;padding:20px}.connections-chooser::backdrop{background:#0000004d}.connections-chooser-heading{justify-content:space-between;align-items:center;gap:10px;display:flex}.connections-chooser-heading h2{margin:0;font-size:20px;font-weight:600}.connections-chooser>p{color:var(--muted);margin:12px 0 22px;font-size:14px}.connection-type-option{border:1px solid var(--line);width:100%;min-height:80px;color:var(--text);text-align:left;cursor:pointer;background:#fff;border-radius:14px;align-items:center;gap:14px;margin-top:12px;padding:16px;display:flex}.connection-type-option>svg{color:#59634b;flex-shrink:0;width:24px;height:24px}.connection-type-option>span:first-of-type{flex-direction:column;flex:1;gap:6px;display:flex}.connection-type-option strong{font-size:16px;font-weight:500}.connection-type-option span span{color:var(--muted);font-size:12px}.connection-type-option:hover{background:var(--soft)}@media (max-width:600px){.connections-heading{gap:8px}.section-panel .connections-heading h1{font-size:21px}.connections-new{gap:5px;padding:8px 10px;font-size:13px}}@media (max-width:360px){.section-panel .connections-heading h1{font-size:18px}.connections-new{padding:8px;font-size:12px}.connections-filter{padding:9px 12px;font-size:13px}}
