/* Application shell and shared touch controls */
html{touch-action:pan-x pan-y;-webkit-text-size-adjust:100%;text-size-adjust:100%;scrollbar-gutter:stable}body{overflow-x:hidden;-webkit-tap-highlight-color:transparent}button,a,input,textarea,select,summary{touch-action:pan-x pan-y}input,textarea,select{font-size:16px!important}input,textarea,select,button{border-radius:14px}textarea{resize:vertical}button,input,select{min-height:44px}.button{min-height:46px;border-radius:14px;transition:background .15s,transform .15s,border-color .15s}.button:active{transform:scale(.98)}.app-icon{width:22px;height:22px;flex-shrink:0;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.circle-control{border:0;width:40px;height:40px;min-height:40px;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;background:transparent;color:#718098;border-radius:50%;padding:0}.circle-control:hover{background:#edf3ff;color:#296fff}.file-control{position:relative;display:flex;width:100%;max-width:100%;margin:10px 0;border:1px dashed #ccd8ed;border-radius:16px;background:#f7f9fe;color:#296fff;overflow:hidden;transition:background .15s,border-color .15s}.file-control:hover{background:#edf3ff;border-color:#296fff}.file-control:focus-within{outline:3px solid #afcaff;outline-offset:3px}.file-control-face{display:flex;align-items:center;gap:12px;min-height:64px;padding:12px 16px;max-width:100%;pointer-events:none}.file-control-face>.app-icon{width:24px;height:24px}.file-control-copy{display:flex;flex-direction:column;min-width:0;gap:3px}.file-control-copy strong{display:block;font-size:14px;font-weight:650;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}.file-control-copy small{display:block;color:#8290a5;font-size:12px;font-weight:400}.file-control.has-file{border-style:solid;border-color:#c5d9ff;background:#f0f5ff}.file-control input.app-file-input{position:absolute!important;inset:0!important;opacity:0!important;z-index:1;width:100%!important;height:100%!important;min-height:0!important;max-width:none!important;margin:0!important;padding:0!important;cursor:pointer!important;font-size:16px!important}.file-control input.app-file-input::file-selector-button{cursor:pointer}.file-control-compact{border:0;border-radius:50%;background:none;width:42px;height:42px;flex:0 0 42px;margin:0;color:#8c9ab1;overflow:hidden}.file-control-compact .file-control-face{width:42px;height:42px;min-height:42px;padding:9px}.file-control-compact:hover{background:#eef3fc}.file-control-compact.has-file{background:#eaf2ff;color:#296fff}.file-control-compact .app-icon{width:24px;height:24px}.profile-photo .file-control{max-width:400px}summary{min-height:44px;display:flex;align-items:center}details.panel>summary{display:list-item;padding-top:6px;padding-bottom:6px}.people-list,.document-list{gap:10px}.list-entry{border-radius:18px}.role-choice{flex-wrap:wrap}.role-choice label:last-child{flex:1 0 100%}#toast{border-radius:16px;box-shadow:0 8px 40px #15254620}
/* Messenger */
.messaging-view .page-footer{display:none}.messenger-title{display:flex;align-items:baseline;justify-content:space-between;margin-bottom:22px;gap:20px}.messenger-title h1{font-size:30px;margin:0;letter-spacing:-1px}.messenger-title>span{font-size:13px;color:#8994a7}.chat-layout[data-messenger]{height:var(--messenger-height,calc(100dvh - 195px));min-height:260px;display:grid;grid-template-columns:320px minmax(0,1fr);border:1px solid #e4eaf4;border-radius:24px;background:#fff;padding:0;overflow:hidden;box-shadow:0 12px 40px #1e3b7510}.chat-layout[data-messenger] .chat-list{padding:0;display:flex;flex-direction:column;border-right:1px solid #eaf0f7;min-height:0;overflow:hidden}.chat-list-header{padding:24px 18px 14px;flex-shrink:0}.chat-list-header>div{display:flex;align-items:center;gap:10px;margin-bottom:18px}.chat-list-header h2{font-size:20px;letter-spacing:-.5px;margin:0}.chat-total{font-size:11px;font-weight:650;color:#8090a9;background:#f0f3f9;min-width:24px;height:24px;display:flex;align-items:center;justify-content:center;border-radius:8px}.chat-search{display:flex;align-items:center;gap:9px;background:#f3f5fa;border-radius:12px;margin:0;padding:0 12px;min-height:42px;color:#9aa6b7}.chat-search .app-icon{width:18px;height:18px}.chat-search input{border:0!important;outline:0!important;box-shadow:none!important;background:transparent!important;margin:0!important;padding:10px 0!important;min-height:42px;font-size:14px!important;width:100%;border-radius:0}.chat-contacts{flex:1;min-height:0;overflow:auto;padding:0 8px 12px;overscroll-behavior:contain}.chat-list-footer{display:flex;align-items:center;justify-content:center;gap:7px;font-size:11px;color:#a0aabe;min-height:45px;border-top:1px solid #f0f3f8}.chat-list-footer .app-icon{width:13px;height:13px}.chat-layout .chat-contact{width:100%;display:flex;gap:12px;align-items:center;border:0;border-radius:16px;padding:16px 12px;background:none;transition:background .15s;min-height:88px;overflow:hidden}.chat-contact:hover{background:#f5f8fe}.chat-layout .chat-contact.active{background:#edf3ff}.chat-avatar{width:46px;height:46px;flex:0 0 46px;border-radius:17px;background:linear-gradient(145deg,#e5eeff,#d7e5ff);color:#4679d8;display:inline-flex;align-items:center;justify-content:center;font-weight:650;font-size:16px;letter-spacing:-.5px}.chat-contact:nth-child(3n+2) .chat-avatar{background:linear-gradient(145deg,#e7e8ff,#e0e1fc);color:#7c70c5}.chat-contact:nth-child(3n+3) .chat-avatar{background:linear-gradient(145deg,#e1f3f0,#daf0ed);color:#488c86}.contact-copy{display:block;flex:1;min-width:0}.contact-heading{display:flex;align-items:center;justify-content:space-between;gap:6px}.chat-contact .contact-heading strong{font-size:14px;font-weight:650;line-height:1.3;color:#24324a;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0}.contact-heading time{font-size:10px;white-space:nowrap;color:#97a3b6}.contact-subject{display:block;color:#8d9ab0;font-size:11px;margin:4px 0}.contact-bottom{display:flex;align-items:center;gap:8px;justify-content:space-between}.contact-preview{color:#7c899f;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chat-unread{min-width:20px;height:20px;padding:0 6px;display:flex;align-items:center;justify-content:center;background:#296fff;color:#fff;font-size:10px;font-weight:700;border-radius:7px}.chat-layout .chat-pane{display:flex;min-height:0;min-width:0;overflow:hidden;background:#fff;flex-direction:column}.chat-placeholder{height:100%;display:flex;align-items:center;justify-content:center;flex-direction:column;text-align:center;padding:32px;background:radial-gradient(ellipse at 50% 30%,#eef4ff,transparent 65%),#fbfcff}.chat-placeholder>.app-icon{width:66px;height:66px;padding:17px;border-radius:22px;background:#e7efff;color:#5e8ee4;margin-bottom:22px}.chat-placeholder h2{font-size:23px;color:#43516b;margin-bottom:8px}.chat-placeholder p{font-size:14px;color:#9aa5b7;max-width:290px}.chat-layout .chat-header{padding:16px 22px;display:flex;align-items:center;gap:12px;min-height:82px;border-bottom:1px solid #eaf0f7;background:#fff;flex-shrink:0}.chat-header .chat-avatar{width:42px;height:42px;flex-basis:42px;border-radius:15px;font-size:15px}.chat-header-copy{flex:1;min-width:0}.chat-header-copy strong{display:block;color:#273650;font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:650}.chat-header-copy small{display:block;font-size:12px;margin-top:5px;color:#94a1b5;font-weight:400}.chat-context-label{font-size:10px;font-weight:600;letter-spacing:.4px;color:#7e9dd6;background:#f1f5fd;border-radius:8px;padding:7px 10px}.chat-back{display:none}.chat-rules{background:#fbfcff;border-bottom:1px solid #edf2f9;flex-shrink:0}.chat-rules summary{padding:10px 22px;min-height:40px;display:flex;align-items:center;justify-content:space-between;list-style:none;cursor:pointer;color:#8b99b0;font-size:11px}.chat-rules summary::-webkit-details-marker{display:none}.chat-rules summary>span:first-child{display:flex;align-items:center;gap:6px}.chat-rules .app-icon{width:13px;height:13px}.chat-rules summary>span:last-child{font-size:10px;color:#9ca8bb}.chat-rules p{margin:0;padding:0 22px 14px;color:#75839b;font-size:12px;line-height:1.65}.chat-layout .messages{padding:20px 26px 24px;background:radial-gradient(ellipse at 5% 2%,#eaf2ff80,transparent 60%),#f7f9fd;flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:8px;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;scrollbar-width:thin;scrollbar-color:#d8e0ee transparent}.message-day{align-self:center;display:flex;justify-content:center;width:100%;margin:10px 0 14px;flex-shrink:0}.message-day span{font-size:10px;color:#9ca9bd;padding:5px 12px;background:#edf2f9b0;border-radius:8px;white-space:nowrap}.chat-layout .bubble{background:#fff;border:1px solid #eaf0f8;box-shadow:0 2px 5px #1d3d7603;max-width:76%;padding:11px 14px 7px;border-radius:17px 17px 17px 5px;color:#34415b;line-height:1.5;font-size:14px;white-space:normal;flex-shrink:0;align-self:flex-start;min-width:72px}.chat-layout .bubble.mine{color:#fff;background:#296fff;border-color:#296fff;border-radius:17px 17px 5px 17px;align-self:flex-end;box-shadow:0 3px 10px #296fff12}.bubble-text{white-space:pre-wrap;overflow-wrap:anywhere}.message-meta{display:flex;gap:6px;justify-content:flex-end;align-items:center;min-height:14px;margin-top:5px;color:#9da9bd;font-size:9px}.message-meta time{color:inherit;font-size:10px;margin:0}.bubble.mine .message-meta{color:#d6e3ff}.message-meta>span:first-child:not(.sent-mark){margin-right:auto}.sent-mark{display:inline-flex}.sent-mark .app-icon{width:13px;height:13px;stroke-width:2}.message-image{display:block;margin-top:5px;border-radius:12px;overflow:hidden}.message-image img{display:block;max-width:100%;width:auto;max-height:320px;object-fit:contain;border-radius:12px}.message-document{display:flex;align-items:center;gap:10px;padding:9px 0;min-width:150px;max-width:100%;color:inherit}.document-symbol{display:flex;align-items:center;justify-content:center;width:40px;height:46px;background:#eff4ff;color:#618fdb;border-radius:11px;flex-shrink:0}.message-document>span:last-child{min-width:0}.message-document strong{display:block;font-size:12px;font-weight:600;overflow-wrap:anywhere}.message-document small{display:block;margin-top:4px;font-size:10px;opacity:.65}.bubble.mine .document-symbol{background:#ffffff25;color:#fff}.bubble.mine .message-document{color:#fff}.message-file-unavailable{display:block;font-size:12px;color:#9aa9be}.chat-layout .chat-composer{padding:14px 18px 18px;background:#fff;border-top:1px solid #e8eef7;flex-shrink:0;display:block;gap:0}.composer-row{display:flex;align-items:flex-end;gap:9px;min-width:0}.composer-input{flex:1;min-width:0;display:flex;background:#f3f6fb;border:1px solid #edf1f8;border-radius:23px;align-items:center}.composer-input:focus-within{border-color:#d0dfff;background:#f8faff}.chat-layout .chat-composer textarea{height:42px;min-height:42px;max-height:126px;resize:none;width:100%;font-size:16px!important;line-height:22px;padding:10px 16px;margin:0;outline:0;border:0;border-radius:23px;background:transparent;box-shadow:none;color:#35415b;-webkit-appearance:none}.chat-composer textarea::placeholder{color:#9aa7bc}.send-message{width:42px;height:42px;min-height:42px;flex:0 0 42px;display:flex;align-items:center;justify-content:center;background:#296fff;color:white;border:0;border-radius:50%;padding:10px;box-shadow:0 3px 10px #296fff20}.send-message .app-icon{width:21px;height:21px;stroke-width:2}.send-message:disabled{opacity:.5}.composer-error:empty{display:none}.composer-error{margin:8px 0 0;font-size:12px}.composer-attachment{padding:0 0 12px 50px}.attachment-draft{display:flex;align-items:center;gap:10px;background:#f3f6fc;border:1px solid #e6edf9;padding:9px;border-radius:14px;max-width:360px}.attachment-draft img,.attachment-draft-icon{width:40px;height:40px;object-fit:cover;border-radius:9px;flex-shrink:0}.attachment-draft-icon{display:flex;align-items:center;justify-content:center;background:#e5edff;color:#618ad3}.attachment-draft-copy{flex:1;min-width:0}.attachment-draft-copy strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;font-weight:600;color:#53627d}.attachment-draft-copy small{display:block;color:#9aa7bb;font-size:10px;margin-top:4px}.attachment-draft .file-remove{width:28px;height:28px;min-height:28px}.file-remove .app-icon{width:15px;height:15px}.chat-empty-thread{margin:auto;align-self:center;display:flex;flex-direction:column;align-items:center;text-align:center;padding:30px;color:#a4afc1;max-width:330px}.chat-empty-thread>.app-icon{width:45px;height:45px;opacity:.5;margin-bottom:16px}.chat-empty-thread strong{font-size:16px;font-weight:600;color:#7b8aa3}.chat-empty-thread p{font-size:13px;line-height:1.6;margin:8px 0 0}.chat-no-contacts,.chat-search-empty{padding:38px 20px;text-align:center;color:#9aa7bc;font-size:13px}.chat-no-contacts>.app-icon{width:42px;height:42px;margin-bottom:16px;opacity:.6}.chat-no-contacts h3{font-size:16px;color:#74849f;line-height:1.4}.chat-no-contacts p{font-size:13px;line-height:1.6}.chat-readonly{background:#fff;padding:18px 22px;color:#93a0b6;font-size:13px;text-align:center;border-top:1px solid #edf2f9}.chat-readonly .button{font-size:12px;margin:8px 0}.support-messenger.chat-layout{display:flex;max-width:930px;margin:0 auto}.support-messenger>.chat-pane{width:100%;flex:1}.support-avatar{background:#296fff;color:white}.chat-header-action{border:0;background:#f4f6fb;border-radius:10px;color:#7d8da8;padding:8px 12px;font-size:11px;min-height:34px}.messaging-view .workspace{min-width:0}.messaging-view main{min-width:0}
@media(min-width:761px){.messaging-view #content{padding-top:26px;padding-bottom:20px}.messaging-view .chat-search input{font-size:14px!important}}
@media(max-width:1050px) and (min-width:761px){.chat-layout[data-messenger]{grid-template-columns:270px minmax(0,1fr)}.chat-list-header{padding-left:15px;padding-right:15px}.chat-layout .messages{padding-left:18px;padding-right:18px}.chat-layout .bubble{max-width:88%}}
@media(max-width:760px){html{scrollbar-gutter:auto}input,textarea,select{font-size:16px!important}.topbar{height:70px;min-height:70px;padding:0 20px}.button{font-size:14px}.mobile-navigation{padding:10px 10px calc(10px + env(safe-area-inset-bottom));box-shadow:0 -5px 25px #1f397004}.mobile-navigation button{font-size:10px;gap:5px}.mobile-navigation .icon{width:23px;height:23px}.messaging-view #content{padding:24px 16px 12px}.messenger-title{display:block;margin-bottom:20px}.messenger-title h1{font-size:29px}.messenger-title>span{display:block;font-size:12px;margin-top:8px}.chat-layout[data-messenger]{display:block;grid-template-columns:1fr;height:var(--messenger-height,calc(100dvh - 250px));min-height:240px;border-radius:20px;box-shadow:0 4px 18px #263d6d04}.chat-layout[data-messenger] .chat-list{height:100%;border:0}.chat-layout[data-messenger].open .chat-list{display:none}.chat-layout[data-messenger]:not(.open) .chat-pane{display:none}.chat-list-header{padding:18px 16px 10px}.chat-list-header>div{display:none}.chat-search{border-radius:12px}.chat-search input{font-size:16px!important}.chat-layout .chat-contact{min-height:92px;padding:16px 10px;border-radius:14px}.chat-contact .contact-heading strong{font-size:15px}.contact-heading time{font-size:11px}.contact-subject{font-size:12px}.contact-preview{font-size:13px}.chat-avatar{height:48px;width:48px;flex-basis:48px;border-radius:17px}.chat-list-footer{font-size:11px;min-height:40px}.conversation-open{position:fixed;inset:0;height:var(--app-height,100dvh);overflow:hidden;background:#f7f9fd}.conversation-open #app,.conversation-open .workspace{height:100%;min-height:0;overflow:hidden;display:flex;flex-direction:column}.conversation-open .topbar,.conversation-open .mobile-navigation,.conversation-open .page-footer,.conversation-open .messenger-title,.conversation-open .sidebar{display:none!important}.conversation-open #content{display:flex;flex-direction:column;flex:1;padding:0!important;margin:0!important;min-height:0;height:100%;width:100%;overflow:hidden;max-width:none}.conversation-open .chat-layout[data-messenger]{height:100%;min-height:0;width:100%;max-width:none;flex:1;display:flex;border:0;border-radius:0;margin:0;box-shadow:none}.conversation-open .chat-pane{height:100%;width:100%;flex:1}.chat-layout .chat-header{min-height:76px;padding:calc(12px + env(safe-area-inset-top)) 16px 12px;gap:10px}.chat-back{display:flex}.chat-header .chat-avatar{height:39px;width:39px;flex-basis:39px;border-radius:14px;font-size:14px}.chat-header-copy strong{font-size:15px}.chat-header-copy small{font-size:11px}.chat-context-label{font-size:9px;padding:6px 8px}.chat-rules summary{padding:10px 18px;font-size:11px}.chat-rules p{padding-left:18px;padding-right:18px;font-size:12px}.chat-layout .messages{padding:16px 14px 20px;gap:8px}.chat-layout .bubble{font-size:15px;max-width:86%;padding:10px 12px 7px}.message-meta time{font-size:10px}.message-day{margin-bottom:12px}.message-day span{font-size:11px}.chat-layout .chat-composer{padding:10px 12px calc(12px + env(safe-area-inset-bottom));border-color:#edf1f7}.keyboard-open .chat-layout .chat-composer{padding-bottom:10px}.composer-row{gap:7px}.composer-input{border-radius:22px}.chat-layout .chat-composer textarea{font-size:16px!important}.file-control-compact{width:40px;height:42px;flex-basis:40px}.send-message{width:42px;height:42px}.composer-attachment{padding-left:0}.chat-header-action{font-size:10px;padding:7px 9px;min-height:32px}.support-messenger .chat-header-copy strong{font-size:14px}.file-control-face{min-height:62px}.file-control-copy strong{font-size:14px}.file-control-copy small{font-size:11px}.message-image img{max-height:270px}.attachment-draft{max-width:100%}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}.button,.chat-contact{transition:none}}
/* iOS keyboard: anchor the entire conversation to the visual, not layout, viewport. */
@media(max-width:760px){
  html.chat-viewport-locked{height:100%;overflow:hidden;overscroll-behavior:none}
  body.conversation-open{inset:auto 0 auto 0;top:var(--app-viewport-top,0px);width:100%;height:var(--app-height,100dvh);min-height:0;overscroll-behavior:none}
  .conversation-open #app,.conversation-open .workspace{min-height:0;max-height:100%}
  .conversation-open .messages{overflow-anchor:none}
}

/* Kvam brand and shared visual style. */
:root{font-family:system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif}
.logo,.logo.mobile-brand{width:92px;height:32px;align-items:center;mix-blend-mode:normal}
.logo>img{display:block;width:100%;height:100%;object-fit:contain}
.auth-page:not(.hidden){display:grid;grid-template-columns:1fr;background:#f5f5f7}
.auth-right{padding:28px;place-items:center}
.auth-card{background:#fff;border:1px solid var(--line);border-radius:28px;padding:36px;width:100%;max-width:440px}
.auth-card .auth-brand{width:112px;height:36px;margin-bottom:24px}
.hero:after{content:none}
.primary,.send-message{box-shadow:none}
.chat-layout .messages{background:#f5f5f7}
@media(max-width:780px){
  .auth-page:not(.hidden){background:#fff}
  .auth-right{padding:calc(36px + env(safe-area-inset-top)) 24px 24px;align-items:start}
  .auth-card{padding:0;border:0;border-radius:0}
}
