*{box-sizing:border-box}body{margin:0;background:#f4f6f1;color:#243c34;font:16px/1.5 system-ui,sans-serif}a{color:#245344;text-underline-offset:3px}button,input,select,textarea{font:inherit}button,.button{cursor:pointer;border-radius:9px;padding:11px 18px;border:1px solid #cbd7cd;background:white;color:#214f42;text-decoration:none;display:inline-block}button.primary,.button.primary{background:#214f42;color:white;border-color:#214f42;font-weight:650}button:disabled{opacity:.55;cursor:wait}input,select,textarea{width:100%;padding:12px;border:1px solid #bdcbbf;border-radius:8px;background:#fff;color:#243c34}textarea{resize:vertical;min-height:90px;max-height:30vh}label{display:block;margin:14px 0;font-weight:550}label input,label select{display:block;margin-top:6px}:focus-visible{outline:3px solid #b3862a;outline-offset:3px}.chat-header{height:88px;display:flex;align-items:center;gap:20px;padding:12px max(20px,4vw);background:white;border-bottom:1px solid #dce3d9}.chat-header img{width:120px;height:60px;object-fit:contain}.chat-header>span{font-weight:700}.chat-header nav{margin-left:auto;display:flex;align-items:center;gap:16px;flex-wrap:wrap}main{max-width:1440px;margin:24px auto;padding:0 24px}.welcome{max-width:1040px;margin:42px auto}.welcome h1{font-size:clamp(30px,4vw,46px);line-height:1.18;max-width:770px;margin:12px 0}.eyebrow{letter-spacing:.14em;font-size:12px;font-weight:700}.muted{color:#61746a;font-size:14px}.auth-grid{display:grid;grid-template-columns:1fr 1fr;gap:24px;margin:32px 0}.card{background:white;padding:28px;border:1px solid #d9e2d5;border-radius:16px}.card h2{margin-top:0}.notice{padding:12px 16px;border-radius:9px;background:#edf2e8}.error{color:#9b3026}#status:empty{display:none}.workspace{display:grid;grid-template-columns:340px minmax(0,1fr);height:calc(100dvh - 140px);gap:20px}.workspace.customer{grid-template-columns:minmax(0,1fr);max-width:1050px;margin:auto}.inbox,.conversation{border:1px solid #d9e2d5;background:#fff;border-radius:16px;min-height:0;overflow:hidden}.inbox{display:flex;flex-direction:column}.inbox-head{padding:16px;border-bottom:1px solid #dce3d9}.inbox-head h1{font-size:23px;margin:0 0 8px}.inbox-head input{margin-top:8px}.thread-list{overflow:auto;flex:1}.thread-row{width:100%;border:0;border-radius:0;text-align:left;padding:17px;border-bottom:1px solid #edf0e9;display:block}.thread-row.selected{background:#eaf1e7;box-shadow:inset 4px 0 #214f42}.thread-row.pending{background:#fff8e4}.thread-row strong,.thread-row small{display:block}.thread-row small{color:#61746a;margin-top:4px}.mail-count{font-weight:750;color:#765210}.conversation{display:flex;flex-direction:column}.conversation-head{padding:16px 22px;border-bottom:1px solid #dce3d9;flex-shrink:0}.conversation-head h1,.conversation-head h2{font-size:23px;margin:0}.chat-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.chat-actions p{margin:6px 0}.message-log{padding:20px 24px;overflow:auto;flex:1;min-height:80px;overscroll-behavior:contain}.message{max-width:82%;padding:13px 17px;border-radius:15px;background:#f0f3ed;margin:0 0 14px}.message.outgoing{margin-left:auto;background:#e1eddd}.message p{white-space:pre-wrap;overflow-wrap:anywhere;margin:6px 0}.message small{display:block;font-size:12px;color:#56685e}.composer{padding:12px 22px 16px;border-top:1px solid #dce3d9;flex-shrink:0;background:#fff}.composer label{margin:0 0 6px}.composer-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:9px}.composer-footer p{margin:0;font-size:13px}.empty{padding:30px;color:#61746a}.back-list{display:none}dialog{border:1px solid #cbd7cd;border-radius:16px;padding:28px;width:min(650px,94vw);max-height:90dvh}dialog::backdrop{background:#172b2466}dialog .close{position:sticky;top:0;float:right;font-size:24px;line-height:1;padding:8px 13px;background:white}dialog h2{margin-right:45px}.account-row{padding:12px 0;border-bottom:1px solid #dce3d9;display:flex;justify-content:space-between;gap:12px}.auth-links{margin-top:18px;font-size:14px}@media(max-width:780px){.chat-header{height:auto;min-height:76px;padding:10px 16px;gap:12px;flex-wrap:wrap}.chat-header img{width:92px;height:44px}.chat-header nav{font-size:13px;gap:10px}.chat-header>span{font-size:15px}main{padding:0 12px;margin:12px auto}.auth-grid{grid-template-columns:1fr;gap:16px;margin-top:22px}.welcome{margin:24px auto}.card{padding:22px}.workspace{height:calc(100dvh - 120px);grid-template-columns:1fr;gap:0}.workspace:not(.customer) .conversation{display:none}.workspace.chat-open .inbox{display:none}.workspace.chat-open .conversation{display:flex}.back-list{display:inline-block}.conversation-head{padding:12px 16px}.message-log{padding:16px 12px}.message{max-width:92%}.composer{padding:10px 12px}.composer textarea{min-height:78px}.composer-footer{align-items:flex-start}.chat-actions{gap:8px}.customer .conversation-head h1{font-size:21px}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}
.conversation-head label{display:flex;align-items:center;gap:14px;margin:8px 0 0;font-size:14px}.conversation-head select{width:auto;min-width:180px;max-width:300px;padding:8px;margin:0}.conversation-head .chat-actions{font-size:14px}.conversation-head .chat-actions button{padding:6px 12px}.message-log{scrollbar-gutter:stable}@media(max-width:780px){.conversation-head label{gap:8px}.conversation-head select{min-width:0;max-width:65%;flex:1}.conversation-head h1{font-size:20px}.composer-footer p{max-width:65%;font-size:12px}}
.login-context{display:flex;align-items:center;gap:12px 24px;flex-wrap:wrap;padding:10px max(20px,4vw);background:#e7efe1;border-bottom:1px solid #ccd9c6;font-size:13px}.login-context span{display:inline-block}.advisor-login{font-weight:700;border:1px solid #b8cbb9;border-radius:8px;padding:8px 12px;text-decoration:none}.chat-header{height:auto;min-height:88px;flex-wrap:wrap}.workspace{height:calc(100dvh - 190px);min-height:460px}@media(max-width:780px){.login-context{padding:10px 16px;gap:6px;font-size:12px;align-items:flex-start;flex-direction:column}.chat-header nav{width:100%;margin-left:0}.workspace{height:calc(100dvh - 220px);min-height:420px}}

.human-team{margin:24px 0;padding:20px 24px;background:#e7efe3;border:1px solid #b8cbb2;border-left:5px solid #214f42;border-radius:12px}.human-team strong{display:block;font-size:clamp(19px,2.3vw,24px);line-height:1.35}.human-team p{margin:8px 0 0}

/* Compact mobile advisor workspace: keep the conversation as the main surface. */
@media(max-width:780px){
 body[data-chat-team="true"] .chat-header{min-height:0;padding:6px 12px;gap:4px 12px}
 body[data-chat-team="true"] .chat-header img{width:70px;height:30px}
 body[data-chat-team="true"] .chat-header>span{font-size:13px}
 body[data-chat-team="true"] .chat-header nav{display:flex;gap:0 16px;align-items:center;flex-wrap:wrap;width:100%;margin:0}
 body[data-chat-team="true"] .chat-header nav a,body[data-chat-team="true"] .chat-header nav button{font:inherit;font-size:13px;font-weight:500;line-height:20px;padding:5px 0;min-height:30px;border:0;border-radius:0;background:transparent;color:#245344;text-decoration:none;box-shadow:none}
 body[data-chat-team="true"] .chat-header nav a:hover,body[data-chat-team="true"] .chat-header nav button:hover{text-decoration:underline}
 body[data-chat-team="true"] .login-context{padding:4px 12px;gap:2px;font-size:11px;line-height:1.35}
 body[data-chat-team="true"].chat-ready{height:100dvh;display:flex;flex-direction:column;overflow:hidden}
 body[data-chat-team="true"].chat-ready>.chat-header,body[data-chat-team="true"].chat-ready>.login-context{flex-shrink:0}
 body[data-chat-team="true"].chat-ready main{flex:1;width:100%;max-width:none;min-height:0;margin:0;padding:6px 6px max(6px,env(safe-area-inset-bottom))}
 body[data-chat-team="true"].chat-ready .workspace{height:100%;min-height:0}
 body[data-chat-team="true"] .conversation-head{padding:10px 12px}
 body[data-chat-team="true"] .back-list{display:inline-block;background:#e5efdf;border:1px solid #b4c9a9;color:#214f42;font-weight:650;font-size:14px;padding:7px 12px;margin:0 0 10px;min-height:36px}
 body[data-chat-team="true"] .conversation-head h1{font-size:18px;line-height:1.3;margin:0 0 3px}
 body[data-chat-team="true"] .conversation-head .chat-actions{font-size:11px;line-height:1.35;color:#61746a}
 body[data-chat-team="true"] .conversation-head label{margin-top:5px;font-size:12px;gap:8px}
 body[data-chat-team="true"] .conversation-head select{padding:2px 0;border:0;background:transparent;font-size:13px;opacity:1;color:#61746a;appearance:none}
 body[data-chat-team="true"] .message-log{padding:12px;min-height:0}
 body[data-chat-team="true"] .composer{padding:8px 12px;flex-shrink:0}
 body[data-chat-team="true"] .composer label{font-size:12px;margin-bottom:3px}
 body[data-chat-team="true"] .composer textarea{font-size:16px;min-height:54px;height:54px;max-height:20dvh;padding:8px}
 body[data-chat-team="true"] .composer-footer{margin-top:5px;gap:8px;align-items:center}
 body[data-chat-team="true"] .composer-footer p{font-size:11px;line-height:1.3}
 body[data-chat-team="true"] .composer-footer button{padding:7px 12px;font-size:14px;min-height:36px}
}

/* Quiet customer navigation; advisor entry remains at the sign-in form. */
body:not([data-chat-team="true"]) .chat-header nav a,body:not([data-chat-team="true"]) .chat-header nav button{border:0;background:transparent;box-shadow:none;border-radius:0;padding:6px 0;font:inherit;font-size:14px;line-height:22px;text-decoration:none;font-weight:500;color:#245344}
body:not([data-chat-team="true"]) .chat-header nav a:hover,body:not([data-chat-team="true"]) .chat-header nav button:hover{text-decoration:underline}
@media(max-width:780px){
 body:not([data-chat-team="true"]) .chat-header{min-height:0;padding:6px 12px;gap:4px 12px}
 body:not([data-chat-team="true"]) .chat-header img{width:70px;height:30px}
 body:not([data-chat-team="true"]) .chat-header>span{font-size:13px}
 body:not([data-chat-team="true"]) .chat-header nav{gap:0 18px;margin:0;width:100%;flex-wrap:wrap}
 body:not([data-chat-team="true"]) .chat-header nav a,body:not([data-chat-team="true"]) .chat-header nav button{font-size:13px;min-height:30px;padding:5px 0;line-height:20px}
 body:not([data-chat-team="true"]) .login-context{padding:4px 12px;gap:2px;font-size:11px;line-height:1.35}
 body:not([data-chat-team="true"]).chat-ready{height:100dvh;display:flex;flex-direction:column;overflow:hidden}
 body:not([data-chat-team="true"]).chat-ready>.chat-header,body:not([data-chat-team="true"]).chat-ready>.login-context{flex-shrink:0}
 body:not([data-chat-team="true"]).chat-ready main{flex:1;width:100%;min-height:0;margin:0;padding:6px 6px max(6px,env(safe-area-inset-bottom))}
 body:not([data-chat-team="true"]).chat-ready .workspace{height:100%;min-height:0}
 body:not([data-chat-team="true"]) .conversation-head{padding:9px 12px}
 body:not([data-chat-team="true"]) .conversation-head h1{font-size:18px;line-height:1.3}
 body:not([data-chat-team="true"]) .conversation-head .chat-actions{font-size:11px;line-height:1.35;color:#61746a}
 body:not([data-chat-team="true"]) .conversation-head label{font-size:12px;margin-top:5px}
 body:not([data-chat-team="true"]) .conversation-head select{font-size:16px;padding:5px}
 body:not([data-chat-team="true"]) .message-log{min-height:0;padding:12px}
 body:not([data-chat-team="true"]) .composer{padding:8px 12px}
 body:not([data-chat-team="true"]) .composer label{font-size:12px;margin-bottom:3px}
 body:not([data-chat-team="true"]) .composer textarea{font-size:16px;min-height:54px;height:54px;max-height:20dvh;padding:8px}
 body:not([data-chat-team="true"]) .composer-footer{margin-top:5px;align-items:center}
 body:not([data-chat-team="true"]) .composer-footer p{font-size:11px;line-height:1.3}
 body:not([data-chat-team="true"]) .composer-footer button{padding:7px 12px;font-size:14px;min-height:36px}
}
