@charset "UTF-8";
:root{color-scheme:dark;--bg:#0b111b;--panel:#111a27;--line:#243143;--muted:#8292a7;--text:#e9f1fa;--accent:#62e0cb}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font:14px/1.6 -apple-system,BlinkMacSystemFont,"Segoe UI","Microsoft YaHei",sans-serif}button,input{font:inherit}button{cursor:pointer;transition:background .18s,transform .18s}button:disabled{opacity:.5;cursor:wait}button:hover:not(:disabled){filter:brightness(1.12)}button:focus-visible,input:focus-visible{outline:2px solid var(--accent);outline-offset:3px}input{width:100%;background:#0c1420;color:var(--text);border:1px solid var(--line);border-radius:10px;padding:13px 14px;min-width:0}input::placeholder{color:#63748b}label{display:block;margin:16px 0;color:#b6c3d3;font-size:13px}label input{display:block;margin-top:8px}h1,h2,p{margin:0}h2{font-size:22px}button{border:0}button.primary{background:var(--accent);color:#07261f;font-weight:650;padding:12px 22px;border-radius:10px}.muted{color:var(--muted)}.eyebrow{color:#648493;font-size:10px;letter-spacing:2.3px;font-weight:600}.logo{display:inline-grid;place-items:center;width:43px;height:43px;border:1px solid #32615f;border-radius:14px;color:var(--accent);font-size:28px;background:#132c31}.brand{display:flex;align-items:center;gap:13px;font-size:20px;font-weight:650}.auth-shell{min-height:100vh;display:grid;grid-template-columns:1.15fr 1fr;max-width:1200px;margin:auto;align-items:center;gap:90px;padding:55px}.intro{position:relative;overflow:hidden;min-height:650px}.intro>.eyebrow{margin-top:65px}.intro h1{font-size:52px;line-height:1.45;letter-spacing:2px;margin:20px 0}.intro p{color:var(--muted);font-size:15px;line-height:2}.intro-tags{display:flex;gap:10px;margin:28px 0}.intro-tags span{border:1px solid #284041;padding:6px 10px;border-radius:30px;font-size:11px;color:#90bfb9}.orbit{width:290px;height:290px;border:1px solid #254349;border-radius:50%;position:absolute;bottom:-160px;left:80px;box-shadow:0 0 0 38px #112028,0 0 0 39px #1d313b,0 0 0 78px #0e1922,0 0 0 79px #192a35}.orbit div{text-align:center;margin-top:45px;color:#528985;letter-spacing:8px;font-size:24px}.orbit span{display:block;font-size:7px;letter-spacing:2px;margin-top:8px}.auth-card{background:linear-gradient(145deg,#152132,#101824);border:1px solid var(--line);border-radius:24px;padding:38px;box-shadow:0 30px 80px #0003}.auth-card h2{margin:12px 0 6px;font-size:28px}.auth-card form{margin-top:24px}.auth-card .primary{width:100%}.text-button{background:none;color:#89b4b5;padding:8px 2px}.auth-card>.text-button{width:100%;margin-top:16px}.footnote{text-align:center;color:#526177;font-size:11px;margin-top:30px}.error{color:#ffb1a5;min-height:24px;font-size:12px;margin-bottom:8px}.center-screen{min-height:100vh;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:18px;padding:30px;text-align:center}.large{width:68px;height:68px;font-size:40px}.workspace{height:100vh;height:100dvh;display:grid;grid-template-columns:78px 330px 1fr;overflow:hidden}.rail{background:#0d1521;border-right:1px solid var(--line);display:flex;align-items:center;flex-direction:column;gap:18px;padding:24px 8px}.rail>.logo{margin-bottom:22px}.nav-button{color:#6d819a;background:none;width:58px;padding:8px;border-radius:12px}.nav-button span{font-size:24px;display:block;line-height:1.3}.nav-button small{font-size:10px}.nav-button.active{color:var(--accent);background:#193232}.rail-bottom{margin-top:auto}.sidebar{background:#111b29;border-right:1px solid var(--line);display:flex;flex-direction:column;min-height:0}.sidebar header{padding:27px 23px 22px;border-bottom:1px solid var(--line)}.sidebar h1{font-size:20px;margin:6px 0 20px;display:flex;gap:10px;align-items:center}.live-dot{display:inline-block;width:6px;height:6px;border-radius:50%;background:var(--accent)}.profile{display:flex;align-items:center;gap:11px}.profile strong{font-size:13px;font-weight:550}.profile small{font-size:10px;display:block;color:var(--muted)}.avatar{display:grid;place-items:center;width:40px;height:40px;flex-shrink:0;border:1px solid #365455;background:linear-gradient(135deg,#1c3e43,#243347);color:#9be5da;border-radius:13px;font-size:16px}.list-top{display:flex;justify-content:space-between;align-items:center;padding:22px 23px 0}.list-top h2{font-size:17px}.list-top .muted{font-size:11px}.search{margin:15px 18px;position:relative}.search span{position:absolute;left:13px;top:6px;font-size:22px;color:#7e94ad}.search input{margin:0;padding:10px 10px 10px 36px;font-size:12px;background:#0d1622}.people-list{flex:1;overflow-y:auto;padding:0 10px}.person{display:flex;align-items:center;gap:12px;padding:15px 12px;width:100%;text-align:left;background:none;border-radius:11px;color:var(--text);margin:3px 0;border:1px solid transparent}.person.selected{background:#183037;border-color:#2a4c4e}.person-info{min-width:0;flex:1}.person-info strong{font-size:13px;font-weight:550}.person-info p{color:var(--muted);font-size:11px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin-top:4px}.badge{background:var(--accent);color:#08271f;border-radius:20px;min-width:19px;padding:1px 5px;font-size:10px;text-align:center}.sidebar footer{padding:12px 23px;border-top:1px solid var(--line);display:flex;align-items:center;gap:7px;font-size:10px;color:#78948f}.sidebar footer button{margin-left:auto}.main{min-width:0;min-height:0;background:radial-gradient(ellipse at 75% 0,#15253555,transparent 65%)}.welcome{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:30px;position:relative}.welcome-icon{font-size:65px;color:#8ae2d3;width:110px;height:110px;display:grid;place-items:center;background:#12282e;border:1px solid #2b464b;border-radius:32px;box-shadow:0 0 0 16px #12212c77;margin-bottom:40px}.welcome h2{font-size:28px;font-weight:550;margin:17px 0 10px}.welcome p{color:var(--muted);font-size:13px}.welcome .primary{margin-top:25px}.welcome-bottom{position:absolute;bottom:28px;font-size:11px;color:#4e647b;letter-spacing:3px}.chat{height:100%;display:flex;flex-direction:column}.chat-header{min-height:94px;display:flex;align-items:center;gap:12px;padding:20px 28px;border-bottom:1px solid var(--line)}.chat-header h2{font-size:16px}.chat-header p{font-size:11px}.chat-label{margin-left:auto;color:#5c958f;border:1px solid #294545;border-radius:20px;padding:3px 10px;font-size:10px}.icon-button{background:none;color:var(--text);font-size:29px}.message-scroll{flex:1;overflow-y:auto;padding:22px 28px;overscroll-behavior:contain}.message-scroll>#older{display:block;margin:0 auto 20px;font-size:11px}.message{display:flex;flex-direction:column;align-items:flex-start;margin:16px 0;gap:5px}.message.self{align-items:flex-end}.bubble{background:#1b2a3c;border:1px solid #2b3b51;color:#dfebf6;padding:11px 16px;border-radius:3px 15px 15px;max-width:80%;word-break:break-word;white-space:pre-wrap}.self .bubble{background:#b2e8d8;color:#123c36;border-color:#b2e8d8;border-radius:15px 3px 15px 15px}.message time{color:#64778d;font-size:10px}.composer{border-top:1px solid var(--line);padding:20px 26px max(18px,env(safe-area-inset-bottom));display:grid;grid-template-columns:1fr auto;gap:12px}.composer input{background:#121e2d}.composer p{grid-column:1/-1;color:#52677f;font-size:10px;display:flex;justify-content:space-between}.empty{padding:35px 15px;text-align:center;color:var(--muted);font-size:12px}.admin-panel{padding:35px;overflow:auto;height:100%}.admin-panel h2{margin:10px 0}.employee{padding:20px 0;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:14px}.employee .person-info p{white-space:normal}.employee .actions{display:flex;gap:12px}.employee .actions button{font-size:12px}.toast{position:fixed;bottom:30px;left:50%;transform:translateX(-50%);background:#294039;border:1px solid #578a77;color:#dcf7ea;padding:12px 22px;border-radius:12px;z-index:20;max-width:90vw;box-shadow:0 8px 30px #0005}dialog{border:1px solid #3d5267;background:#152132;color:var(--text);border-radius:18px;width:380px;max-width:90vw;padding:28px}dialog::backdrop{background:#0009}.dialog-actions{display:flex;justify-content:flex-end;gap:20px}.sr-only{position:absolute;clip:rect(0,0,0,0);width:1px;height:1px;overflow:hidden}#back{display:none}[hidden]{display:none!important}@media(max-width:1000px){.auth-shell{gap:35px;padding:35px}.intro h1{font-size:40px}.workspace{grid-template-columns:65px 290px 1fr}.rail{padding-left:3px;padding-right:3px}.chat-header{padding:18px}.message-scroll{padding:18px}.chat-label{display:none}.admin-panel{padding:23px}.employee{flex-wrap:wrap}}@media(max-width:700px){.auth-shell{display:block;padding:28px 20px}.intro{min-height:0}.intro .brand{font-size:19px}.intro>.eyebrow,.intro h1,.intro p,.intro-tags,.orbit{display:none}.auth-card{margin-top:28px;padding:26px 22px}.workspace{grid-template-columns:60px 1fr}.sidebar{border-right:0}.sidebar header{padding-top:22px}.main{display:none}.workspace.chat-open,.workspace.admin-open{display:block}.workspace.chat-open .rail,.workspace.chat-open .sidebar{display:none}.workspace.chat-open .main{display:block;height:100%}#back{display:block}.chat-header{min-height:80px}.bubble{max-width:90%}.composer{padding:13px 14px max(14px,env(safe-area-inset-bottom));gap:8px}.composer .primary{padding:10px 14px}.composer p{font-size:9px}.workspace.admin-open{display:grid;grid-template-columns:60px 1fr}.workspace.admin-open .sidebar{display:none}.workspace.admin-open .main{display:block}.admin-panel{padding:22px 16px}.employee .actions{width:100%;justify-content:flex-end}.rail{padding-top:22px}.toast{bottom:95px}.welcome{display:none}}
.media-actions{display:flex;margin-left:auto;gap:6px}.chat-image{display:block;max-width:min(260px,60vw);max-height:300px;border-radius:10px}.composer{flex-wrap:wrap}.composer #image-file[hidden]{display:none}.call-panel{width:min(560px,94vw);max-height:94dvh;text-align:center;background:#101c2c;color:#e5f2f2;border:1px solid #29475a;border-radius:24px;padding:24px}.call-panel::backdrop{background:#020710d9}.call-videos{position:relative;min-height:180px}.call-videos video{width:100%;max-height:50dvh;background:#070e18;border-radius:16px}.call-videos #local-video{position:absolute;right:10px;bottom:10px;width:28%;max-height:130px;transform:scaleX(-1)}.audio-only .call-videos{min-height:0}.audio-only video{height:1px;opacity:0}.call-controls{display:flex;justify-content:center;flex-wrap:wrap;gap:12px;margin-top:20px}.danger{background:#a73348!important;color:white!important}@media(max-width:600px){.chat-header{gap:8px}.media-actions{gap:0}.media-actions button{padding:8px}.composer{gap:6px}.composer input#message{min-width:100px}}
.composer{grid-template-columns:auto minmax(0,1fr) auto}

.image-panel{width:min(480px,92vw);max-height:90dvh;overflow:auto}.image-panel #image-preview{display:block;max-width:100%;max-height:45dvh;object-fit:contain;margin:16px auto;border-radius:12px}.image-panel progress{width:100%;accent-color:#69d9c8;height:12px}.image-panel #image-details{overflow-wrap:anywhere}.image-viewer{width:min(1100px,96vw);max-height:96dvh;padding:14px;background:#0c1420}.image-viewer img{display:block;max-width:100%;max-height:82dvh;object-fit:contain;margin:auto}.image-viewer::backdrop{background:#020710e8}

.brand-logo{display:block;width:280px;height:92px;background-image:url('/jiangnan-logo.png');background-repeat:no-repeat;background-position:left center;background-size:contain;flex-shrink:0}.brand-symbol{display:block;width:44px;height:44px;border-radius:12px;background-color:#fff;background-image:url('/jiangnan-mark.png');background-repeat:no-repeat;background-position:center;background-size:36px auto;flex-shrink:0}.welcome-brand{margin:0 auto 32px}.file-card{display:flex;flex-direction:column;gap:8px;color:inherit;text-decoration:none;min-width:120px;max-width:min(320px,65vw);padding:6px}.file-name{overflow-wrap:anywhere;word-break:break-word}.file-card small{opacity:.7}.attachment-tools{display:flex;align-items:center;gap:2px}.attachment-tools input[hidden]{display:none}.image-panel progress{width:100%;accent-color:#69d9c8}.image-panel .file-name{display:block;margin:20px 0}.composer .attachment-tools button{padding:8px 5px}@media(max-width:600px){.composer{grid-template-columns:minmax(0,1fr) auto}.attachment-tools{grid-column:1/-1}.brand-logo{max-width:100%}}
/* Light authentication surface; workspace keeps its existing palette. */
body:has(#auth:not([hidden])){background:#fff}
#auth{color-scheme:light;--text:#202b3b;--muted:#647287;--line:#dce3eb;--accent:#005fac;color:var(--text);background:#fff}
#auth .auth-card{background:#fff;border-color:#e2e7ee;box-shadow:0 20px 65px #23334d0b}
#auth .eyebrow{color:#68778b}
#auth label{color:#445166}
#auth input{background:#f8fafc;color:#202b3b;border-color:#dce3eb}
#auth input::placeholder{color:#738095}
#auth input:focus{background:#fff;border-color:#005fac}
#auth .primary{background:#005fac;color:#fff}
#auth .text-button{color:#00477f}
#auth .error{color:#b42335}
#auth .footnote{color:#6b788b}
#auth .intro-tags span{background:#fafbfc;border-color:#e0e6ed;color:#59677a}
#auth .orbit{border-color:#cbd9e5;box-shadow:0 0 0 38px #f9fbfd,0 0 0 39px #e5ebf0,0 0 0 78px #fcfdfd,0 0 0 79px #edf0f3}
#auth .orbit div{color:#6083a0}
#auth .orbit{bottom:-140px}
/* Unified light office theme. */
:root{color-scheme:light;--bg:#fff;--panel:#fff;--line:#e2e7ee;--muted:#637186;--text:#202b3b;--accent:#005fac}
input{background:#f8fafc;color:var(--text)}input::placeholder{color:#738095}label{color:#445166}button.primary{color:#fff}button:hover:not(:disabled){filter:brightness(.96)}.text-button{color:#00477f}.eyebrow{color:#68778b}.error{color:#b42335}
.rail{background:#f7f8fa}.nav-button{color:#657287}.nav-button.active{background:#ecf5fc;color:#005fac}.sidebar{background:#fff}.sidebar .search input{background:#f8fafc}.search span{color:#738095}.sidebar footer{color:#637186}.live-dot{background:#25846a}
.main{background:#fafbfc}.chat-header,.composer{background:#fff}.composer input#message{background:#f8fafc}.composer p{color:#68778b}.icon-button{color:#445166}.person.selected{background:#eef5fd;border-color:#c3daf0}.person:hover:not(.selected){background:#f7f8fa}.avatar{background:#eef4fb;border-color:#c9ddf1;color:#005fac}.badge{background:#005fac;color:#fff}
.bubble{background:#fff;border-color:#e0e5ec;color:#202b3b;box-shadow:0 2px 6px #24344d04}.self .bubble{background:#e6effa;border-color:#d4e5f2;color:#263f54}.message time{color:#6b788b}.chat-label{color:#637186;border-color:#dce3eb}.file-card small{opacity:1;color:#647084}
.welcome h2{color:#202b3b}.welcome-bottom{color:#738095}.welcome-icon,.logo{background:#eef5fd;border-color:#c3daf0;color:#005fac;box-shadow:none}.admin-panel{background:#fff}.center-screen{background:#fff}
.toast{background:#fff;border-color:#dce3eb;color:#202b3b;box-shadow:0 8px 30px #24344d1a}dialog,.call-panel,.image-viewer{background:#fff;color:#202b3b;border-color:#dce3eb;box-shadow:0 20px 70px #24344d26}dialog::backdrop,.call-panel::backdrop,.image-viewer::backdrop{background:#26364a66}.image-panel progress{accent-color:#005fac}.call-videos video{background:#f1f3f6}.danger{background:#be1230!important;color:#fff!important}

/* Emoji picker fits both the desktop and mobile composer. */
.composer{position:relative}.emoji-panel{position:absolute;bottom:calc(100% + 8px);left:14px;width:min(360px,calc(100% - 28px));padding:12px;background:#fff;border:1px solid #e2e7ee;border-radius:16px;box-shadow:0 8px 32px #24344d20;z-index:8}.emoji-tabs{display:flex;gap:8px;margin-bottom:10px}.emoji-tabs button{background:#f7f8fa;color:#637186;padding:6px 12px;border:0;border-radius:8px}.emoji-tabs button[aria-pressed=true]{background:#e6effa;color:#00477f}.emoji-tabs .emoji-close{margin-left:auto}.emoji-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:4px;max-height:200px;overflow-y:auto;overscroll-behavior:contain}.emoji-choice{font-family:"Apple Color Emoji","Segoe UI Emoji",sans-serif;font-size:25px;line-height:1.3;min-height:42px;padding:6px 0;background:#fff;border:0;border-radius:8px}.emoji-choice:hover{background:#eef5fd}.emoji-choice:focus-visible{outline:2px solid #005fac;outline-offset:-2px}
/* Member profiles and group tools. */
.avatar img{width:100%;height:100%;object-fit:cover;border-radius:inherit}.avatar{overflow:hidden;flex-shrink:0}.member-dialog{width:min(440px,calc(100vw - 28px));max-height:85dvh;overflow:auto;padding:24px}.member-dialog h2{margin:0 0 12px}.member-dialog input{width:100%}.member-results{max-height:240px;overflow:auto;margin:12px 0}.member-result{display:flex;align-items:center;gap:12px;width:100%;padding:10px;background:#fff;border:1px solid #e2e7ee;border-radius:10px;color:#202b3b;margin:6px 0;text-align:left}.member-result .avatar{width:38px;height:38px}.member-selected{display:flex;flex-wrap:wrap;gap:8px;align-items:center}.member-chip{border:1px solid #c3daf0;background:#eef5fd;color:#00477f;border-radius:20px;padding:6px 10px}.avatar-preview{display:block;width:128px;height:128px;object-fit:cover;border-radius:24px;margin:20px auto}.sender-name{color:#637186;font-size:12px;margin:0 0 5px}.media-actions{flex-wrap:wrap;justify-content:flex-end}#change-avatar,#create-group{margin-top:8px}#create-group{margin-left:12px}@media(max-width:600px){.member-dialog{padding:18px}.chat-header{gap:8px}.chat-header h2{font-size:16px}.media-actions{gap:2px}.media-actions .text-button{padding:6px}.chat-header .avatar{width:36px;height:36px}}
/* Keyboard-safe mobile chat: only the message list scrolls. */
.chat{min-height:0;min-width:0}.chat-header,.composer{flex-shrink:0}.message-scroll{min-height:0;min-width:0;flex:1 1 0;-webkit-overflow-scrolling:touch}.chat-header>div:not(.avatar):not(.media-actions){min-width:0;overflow-wrap:anywhere}.composer #send{white-space:nowrap;align-self:end}.composer textarea#message{width:100%;min-width:0;min-height:44px;max-height:120px;resize:none;overflow-y:auto;background:#f8fafc;color:var(--text);border:1px solid var(--line);border-radius:10px;padding:10px 12px;font:inherit;line-height:1.5;overflow-wrap:anywhere}
@media(max-width:700px){
 input,textarea,.search input,.composer textarea#message{font-size:16px}
 body.mobile-workspace{overflow:hidden;overscroll-behavior:none}
 .mobile-workspace .workspace{position:fixed;left:0;right:0;top:var(--screen-top,0px);height:var(--screen-height,100dvh);width:100%;max-width:100%;min-height:0}
 .chat-header{padding:10px 12px;min-height:64px;padding-top:max(10px,env(safe-area-inset-top))}
 .chat-header .media-actions{flex-shrink:0;max-width:46%}
 .composer{grid-template-columns:minmax(0,1fr) auto;padding:8px 12px max(10px,env(safe-area-inset-bottom));gap:6px}
 .attachment-tools{grid-column:1/-1}.composer textarea#message{min-width:0;padding:10px 12px}
 .keyboard-open .composer{padding-bottom:8px}.keyboard-open .composer p{display:none}
 .keyboard-open .emoji-grid{max-height:110px}.message-scroll{padding:12px}
 .member-dialog,.image-panel{max-height:calc(var(--screen-height,100dvh) - 24px)}
}
.chat-video{display:block;width:min(300px,62vw);max-height:360px;background:#101820;border-radius:10px}.video-note{display:block;max-width:300px;white-space:normal;color:#637186;margin:6px 0}.recall-button{background:none;color:#64798a;font-size:11px;padding:3px 5px}.message.recalled{align-items:center;color:#83909c;font-size:12px;margin:18px 0}.chat-video+.video-note+.file-card{font-size:11px;padding:4px;min-width:0}

.chat-audio{display:block;width:280px;max-width:100%;height:54px;background:transparent;}#voice-preview{width:100%;margin:12px 0;}#unread-total{position:absolute;right:2px;top:2px;}[data-tab="messages"]{position:relative;}#enable-badge{font-size:12px;margin-top:8px;}
/* Notification controls stay in a compact, keyboard-accessible dialog. */
.push-settings{width:min(440px,calc(100vw - 32px));box-sizing:border-box;max-height:calc(100dvh - 48px);overflow:auto}
.push-settings p{line-height:1.7;overflow-wrap:anywhere}
.push-settings .dialog-actions{flex-wrap:wrap;gap:10px}

/* Native App settings: served externally because CSP blocks injected inline styles. */
    html.office-app {color-scheme:light;--app-message-size:16px}
    html.office-app[data-app-font="large"] {--app-message-size:18px}
    .office-app .bubble,.office-app #message {font-size:var(--app-message-size)}
    .office-app input,.office-app textarea {font-size:16px}
    .office-app button {touch-action:manipulation}
    .office-app .chat-header {background:#fff}
    .office-app .chat-header>div:not(.media-actions) {min-width:0}
    .office-app #peer-name {overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
    .office-app .message-scroll {background:#f7f8fa}
    .office-app .bubble {background:#fff;border-color:#e8e9ed;color:#242731;line-height:1.6}
    .office-app .self .bubble {background:#f0f8ff;border-color:#dbe9f5;color:#253643}
    .office-app .composer {background:#fff;grid-template-columns:minmax(0,1fr) auto}
    .office-app .attachment-tools {grid-column:1/-1;flex-wrap:wrap;gap:6px}
    .office-app .attachment-tools button {min-height:40px;padding:7px 12px;border-radius:12px;background:#f5f6f8;color:#5b616e}
    .office-app .media-actions {flex-wrap:wrap;justify-content:flex-end;flex-shrink:0;max-width:46%}
    .office-app .media-actions button {min-height:38px}
    .office-app .auth-card {border-color:#eee;box-shadow:0 12px 38px #29304408}
    .office-app .rail-bottom>.logout,.office-app #sound-toggle,.office-app #enable-badge {display:none!important}
    #office-app-entry {min-height:48px;color:#355b7a}
    #office-app-auth-entry {display:block;margin:14px auto 0;color:#737984;font-size:13px}
    #office-app-settings {width:min(540px,100%);max-width:100%;max-height:100%;height:100%;margin:0 0 0 auto;border:0;border-radius:0;padding:0;background:#f6f7f9;color:#252a34;overflow:auto;overscroll-behavior:contain}
    #office-app-settings::backdrop {background:#14203260}
    .app-settings-header {position:sticky;top:0;z-index:1;display:flex;align-items:center;gap:12px;padding:18px 20px;background:#ffffffed;border-bottom:1px solid #eceef1;backdrop-filter:blur(12px)}
    .app-settings-header h2 {font-size:20px;flex:1;letter-spacing:.5px}
    .app-settings-header button {background:#f1f2f5;border-radius:50%;width:36px;height:36px;color:#515868;font-size:24px;line-height:1}
    .app-settings-content {padding:22px 20px max(30px,env(safe-area-inset-bottom))}
    .app-identity {display:flex;align-items:center;gap:14px;margin-bottom:26px}
    .app-identity img {width:62px;height:62px;object-fit:contain;background:#fff;border-radius:18px;border:1px solid #eee}
    .app-identity strong {display:block;font-size:19px;color:#252a34}
    .app-identity small {font-size:12px;color:#7e8490;line-height:1.8}
    .app-section-title {margin:22px 4px 9px;font-size:12px;letter-spacing:1px;color:#7c8391;font-weight:500}
    .app-settings-card {background:#fff;border:1px solid #e9ebef;border-radius:18px;overflow:hidden}
    .app-setting-row {display:flex;align-items:center;justify-content:space-between;gap:14px;width:100%;padding:16px;text-align:left;border:0;border-bottom:1px solid #f0f1f4;color:#303642;background:transparent;font-size:15px}
    .app-setting-row:last-child {border-bottom:0}
    .app-setting-row small {display:block;line-height:1.7;font-size:12px;color:#878d98;margin-top:4px}
    .app-setting-row .app-value {color:#8b909b;font-size:13px;text-align:right;flex-shrink:0}
    .app-switch {position:relative;width:46px;height:28px;border-radius:20px;background:#daddE4;flex-shrink:0}
    .app-switch:after {content:'';position:absolute;top:3px;left:3px;width:22px;height:22px;background:#fff;border-radius:50%;box-shadow:0 1px 3px #0002;transition:transform .15s}
    [aria-checked="true"] .app-switch {background:#0071cc}
    [aria-checked="true"] .app-switch:after {transform:translateX(18px)}
    .app-note {font-size:12px;line-height:1.8;color:#838a96;padding:10px 4px 0}
    .app-setting-row.app-exit {justify-content:center;color:#0071cc;font-weight:600}
    .app-font-buttons {display:flex;gap:6px}
    .app-font-buttons button {padding:7px 12px;border-radius:9px;background:#f1f2f5;color:#737a87;font-size:13px}
    .app-font-buttons [aria-pressed="true"] {background:#e8f3fc;color:#0068bd}
    .app-footer {text-align:center;margin-top:28px;color:#a0a5af;letter-spacing:1px;font-size:11px}
    @media(max-width:700px) {.office-app .auth-shell {padding:30px 22px}.office-app .auth-card {padding:25px 20px}.office-app .chat-header {padding:12px;gap:8px;min-height:74px}.office-app .chat-header .avatar {width:34px;height:34px;flex-shrink:0}.office-app .message-scroll {padding:12px}.office-app .composer {padding:10px 12px}.office-app .composer p {display:none}.office-app .composer input#message {min-width:0}}
    @media(prefers-reduced-motion:reduce) {.app-switch:after {transition:none}}

/* Keep settings usable at narrow widths and with long account names. */
#office-app-settings {box-sizing:border-box;inset:0 0 0 auto;height:100dvh;max-height:100dvh;max-width:100vw}
#office-app-settings .app-settings-header h2 {margin:0;min-width:0}
#office-app-settings .app-settings-header button {padding:0;flex-shrink:0}
#office-app-settings .app-identity img {flex-shrink:0}
#office-app-settings .app-identity>div,#office-app-settings .app-setting-row>span:first-child {min-width:0;overflow-wrap:anywhere}
#office-app-settings .app-setting-row {box-sizing:border-box;min-height:58px;font-family:inherit;white-space:normal}
#office-app-settings .app-setting-row .app-value {max-width:35%;white-space:normal}
#office-app-settings .app-font-buttons {flex-shrink:0}
#office-app-settings .app-settings-card:has(.app-exit) {margin-top:24px}
#office-app-settings button {-webkit-appearance:none;appearance:none;cursor:pointer}
#office-app-settings button:disabled {cursor:default}
#office-app-settings .app-note {margin:0}
