:root{--bg:#0b1220;--panel:#101827;--panel2:#0f172a;--card:#111c31;--card2:#0c1526;--line:#243149;--text:#f5f7fb;--muted:#97a8c4;--brand:#5b5bf0;--brand2:#7467ff;--ok:#19b86a;--bad:#e24a62;--warn:#d89922;--shadow:0 18px 60px #0006}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font-family:Manrope,Inter,Segoe UI,Arial,sans-serif}button,input,select,textarea{font:inherit}button{cursor:pointer;border:1px solid var(--line);background:#0c1525;color:var(--text);border-radius:13px;padding:10px 14px;transition:.12s transform,.12s border-color,.12s background}button:hover{border-color:#6476ff;transform:translateY(-1px)}input,textarea,select{background:#09111f;border:1px solid var(--line);color:var(--text);border-radius:13px;padding:12px;outline:none}input:focus,textarea:focus,select:focus{border-color:var(--brand2)}textarea{resize:vertical;min-height:46px}.hidden{display:none!important}.primary{background:var(--brand);border-color:var(--brand);font-weight:800}.secondary{background:#1d2a45;border-color:#4f5fe8;font-weight:800}.auth{min-height:100vh;display:grid;place-items:center;background:radial-gradient(circle at 50% 0,#1b2860 0,#0b1220 48%)}.card{width:min(460px,92vw);background:rgba(15,23,42,.96);padding:32px;border:1px solid var(--line);border-radius:26px;box-shadow:var(--shadow)}.logo,.brandLogo{width:52px;height:52px;border-radius:16px;background:linear-gradient(135deg,var(--brand),#8a5cff);display:grid;place-items:center;font-weight:900}.card input,.card button{width:100%;margin-top:12px}.tabs{display:flex;gap:8px}.tabs button{width:auto}.tabs .active,.nav .active{border-color:var(--brand2);background:#1b2642}.err{color:#ff6b7d;margin-top:12px}small,.me span{color:var(--muted)}
.app{height:100vh;display:grid;grid-template-columns:390px minmax(0,1fr);background:var(--bg)}.sidebar{background:linear-gradient(180deg,#111b2e,#0d1627);border-right:1px solid var(--line);padding:16px 18px;overflow:auto}.brand{display:flex;gap:12px;align-items:center;margin-bottom:16px}.brand span{display:block;color:var(--muted);font-size:13px;margin-top:2px}.profileBox{display:grid;grid-template-columns:46px minmax(0,1fr) auto;gap:10px;align-items:center;background:#0b1424;border:1px solid var(--line);border-radius:20px;padding:12px}.avatar,.miniAvatar,.chatAvatar{display:grid;place-items:center;border-radius:15px;background:linear-gradient(135deg,#293a66,#5b5bf0);font-weight:900}.avatar{width:46px;height:46px}.miniAvatar{width:40px;height:40px;flex:0 0 auto}.chatAvatar{width:54px;height:54px;border-radius:18px}.profileText{min-width:0}.profileText b,.profileText span{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.logoutBtn{padding:8px 10px}.nav{position:sticky;top:0;background:linear-gradient(180deg,#111b2e,#111b2eea);z-index:2;display:grid;grid-template-columns:1fr 1fr 1fr;gap:8px;padding:12px 0;margin:10px 0}.nav button{padding:10px 8px}.quickActions{display:grid;grid-template-columns:1fr;gap:8px;margin-bottom:14px}.quickActions button{width:100%}.sideSection{margin-top:16px}.sectionTitle{display:flex;align-items:center;justify-content:space-between}.sectionTitle h4,h4{color:var(--muted);font-size:12px;letter-spacing:.08em;text-transform:uppercase;margin:12px 0 9px}.sectionTitle span{background:#0b1424;border:1px solid var(--line);border-radius:999px;padding:4px 8px;color:var(--muted);font-size:12px}.listBlock{display:grid;gap:8px}.item{border:1px solid var(--line);background:#0b1424;border-radius:16px;padding:11px;transition:.12s border-color,.12s transform,.12s background}.item:hover{border-color:#5064ff;background:#101d34}.item.active{border-color:var(--brand2);background:#1a2540}.chatItem,.userItem{display:flex;align-items:center;gap:11px}.itemText{min-width:0}.itemText b,.itemText small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.item small{color:var(--muted);font-size:12px;margin-top:3px}.sideEmpty{color:var(--muted);border:1px dashed var(--line);border-radius:16px;padding:18px;text-align:center}.dot{display:inline-block;width:8px;height:8px;border-radius:50%;background:var(--ok);margin-left:6px;box-shadow:0 0 0 3px #19b86a20}.adminItem{display:block}.adminTop{display:flex;gap:10px;align-items:center}.adminBtns{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}.adminBtns button{flex:1;min-width:135px}.workspace{min-width:0;display:flex;flex-direction:column;overflow:hidden}.empty{height:100%;display:grid;place-items:center;text-align:center;color:var(--muted);padding:28px;min-width:0;overflow:hidden}.welcomeCard{width:min(760px,calc(100% - 32px));max-width:100%;background:linear-gradient(180deg,#111c31,#0d1627);border:1px solid var(--line);border-radius:28px;padding:34px;box-shadow:var(--shadow)}.welcome h2{color:var(--text);font-size:34px;margin:0 0 8px}.welcomeGrid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-top:22px}.welcomeGrid div{background:#0b1424;border:1px solid var(--line);border-radius:18px;padding:16px;text-align:left}.welcomeGrid b,.welcomeGrid span{display:block}.welcomeGrid span{color:var(--muted);margin-top:4px}.chatLayout{height:100%;display:grid;grid-template-rows:auto minmax(0,1fr) auto;background:radial-gradient(circle at 50% 0,#111e39,#0b1220 65%)}.chatHeader,.header{padding:18px 24px;border-bottom:1px solid var(--line);background:rgba(16,24,39,.92);backdrop-filter:blur(8px)}.chatTitleBlock{display:flex;align-items:center;gap:14px}.chatHeader h2,.header h2{margin:0 0 5px;font-size:25px}.chatHeader div,.header div{color:var(--muted)}.messages{padding:24px;overflow:auto}.bubble{max-width:620px;margin:12px 0;padding:14px 16px;border-radius:18px 18px 18px 6px;background:#17243c;border:1px solid #263753;box-shadow:0 10px 26px #0002;overflow-wrap:anywhere}.bubble.mine{margin-left:auto;border-radius:18px 18px 6px 18px;background:linear-gradient(135deg,#514ee5,#6c5cff);border-color:#7467ff}.meta{font-size:12px;color:#c7d5ee;margin-bottom:6px}.composer{display:flex;gap:10px;padding:16px 20px;border-top:1px solid var(--line);background:#0e1728}.composer input{flex:1}.composer button{background:var(--brand);border-color:var(--brand);font-weight:800}.header{display:flex;align-items:center;justify-content:space-between;gap:16px}.headerBtn{background:var(--brand);border-color:var(--brand);font-weight:800;white-space:nowrap}.tasks{padding:22px;overflow:auto;background:#0b1220}.taskToolbar{display:grid;grid-template-columns:minmax(220px,1fr) 210px 120px;gap:12px;margin-bottom:16px}.summary{display:grid;grid-template-columns:repeat(5,minmax(100px,1fr));gap:10px;margin-bottom:18px}.summary div{background:#0b1424;border:1px solid var(--line);border-radius:16px;padding:14px}.summary b{display:block;font-size:24px}.summary span{color:var(--muted);font-size:13px}.emptySmall{border:1px dashed var(--line);border-radius:18px;padding:28px;text-align:center;color:var(--muted)}.task{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:18px;padding:18px 20px;border:1px solid var(--line);border-radius:22px;background:linear-gradient(180deg,#121d31,#0f192b);box-shadow:0 12px 30px #0002;margin:13px 0}.taskDone{opacity:.66}.taskTitle{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-bottom:7px}.taskTitle h3{font-size:20px;line-height:1.2;margin:0}.taskId{font-weight:900;color:#9db0d1;background:#0a1220;border:1px solid var(--line);border-radius:10px;padding:5px 8px}.pill{border-radius:999px;padding:7px 10px;font-size:12px;font-weight:800}.purgent{background:#7d1e31;color:white}.phigh{background:#7a4d14}.pnormal{background:#21436c}.plow{background:#264233}.snew{background:#243d6b}.swork{background:#5e4615}.swait{background:#4a365c}.sdone{background:#0d5737}.mutedLine,.skuTitle{color:var(--muted);font-size:14px;margin:6px 0}.skuWrap{display:flex;flex-wrap:wrap;gap:7px;margin:7px 0 10px}.skuChip{padding:7px 10px;border-radius:999px;border-color:#5064ff;background:#111d34;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:800}.skuChip:hover{background:#22345d}.taskDesc,.descBox{background:#0b1424;border:1px solid #24324b;border-radius:14px;padding:12px;margin:10px 0 0;white-space:pre-wrap;overflow-wrap:anywhere}.taskActions{display:flex;flex-direction:column;gap:9px;align-items:stretch;min-width:138px;margin:0}.taskActions button{width:100%;white-space:nowrap}.taskActions small{text-align:center;color:var(--muted)}.doneBtn{background:#0f6b42;border-color:#178955;font-weight:800}.modal{position:fixed;inset:0;background:#0009;display:grid;place-items:center;z-index:20}.modalCard{width:min(850px,94vw);max-height:90vh;overflow:auto;background:#0e1728;border:1px solid var(--line);border-radius:22px;padding:24px;position:relative;box-shadow:var(--shadow)}.x{position:absolute;right:14px;top:14px}.formgrid{display:grid;gap:10px}.split{display:grid;grid-template-columns:1fr 1fr;gap:12px}.comment,.event{background:#09111f;border:1px solid var(--line);border-radius:12px;padding:10px;margin:8px 0}.event{color:var(--muted);font-size:13px}.hint{color:var(--muted);background:#0b1424;border:1px solid var(--line);border-radius:14px;padding:10px 12px;margin:10px 0}.taskCardMeta{display:grid;gap:8px;background:#09111f;border:1px solid var(--line);border-radius:14px;padding:12px;margin:12px 0}.modal label,.formgrid label{color:var(--muted);font-size:13px;margin-top:4px}.modal select,.modal textarea,.modal input{width:100%}select:disabled,textarea:disabled,input:disabled{opacity:.65;cursor:not-allowed}.toast{position:fixed;left:50%;bottom:28px;transform:translateX(-50%);background:#0b1424;border:1px solid var(--brand2);border-radius:999px;padding:12px 18px;z-index:99;box-shadow:0 12px 40px #0008}
@media(max-width:1160px){.app{grid-template-columns:330px minmax(0,1fr)}.summary{grid-template-columns:repeat(2,1fr)}.task{grid-template-columns:1fr}.taskActions{flex-direction:row;flex-wrap:wrap}.taskActions button{width:auto}.taskToolbar{grid-template-columns:1fr}.welcomeGrid{grid-template-columns:1fr}}
@media(max-width:900px){.welcomeCard{width:calc(100% - 24px);padding:22px}.welcome h2{font-size:28px}.app{display:block;height:auto;min-height:100vh}.sidebar{height:auto}.header,.chatHeader{align-items:flex-start;flex-direction:column}.summary{grid-template-columns:1fr 1fr}.taskActions button{width:100%}.split{grid-template-columns:1fr}.skuChip{white-space:normal}}

/* v12: рабочая область без перекрытий + задачи/мои внутри одного раздела */
html,body{width:100%;max-width:100%;overflow:hidden}.app{width:100vw;max-width:100vw;overflow:hidden}.sidebar{min-width:0}.workspace{position:relative;z-index:0;min-width:0}.nav{grid-template-columns:1fr 1fr}.chatHome{height:100%;display:flex;flex-direction:column;min-width:0;background:#0b1220;overflow:auto}.homePanels{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;padding:22px}.homePanel{background:linear-gradient(180deg,#111c31,#0d1627);border:1px solid var(--line);border-radius:22px;padding:18px;min-height:130px;display:flex;flex-direction:column;gap:8px}.homePanel b{font-size:18px}.homePanel span{color:var(--muted);line-height:1.4}.homePanel button{margin-top:auto;align-self:flex-start;background:var(--brand);border-color:var(--brand);font-weight:800}.accentPanel{border-color:#4f5fe8}.empty{width:100%;max-width:100%;display:flex;align-items:center;justify-content:center}.welcomeCard{width:min(720px,calc(100% - 32px));box-shadow:none}.taskScope{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:14px}.taskScope button{background:#0b1424}.taskScope button.active{background:#1b2642;border-color:var(--brand2);font-weight:800}
@media(max-width:1160px){.app{grid-template-columns:minmax(290px,330px) minmax(0,1fr)}.homePanels{grid-template-columns:1fr}.headerBtn{width:100%}}
@media(max-width:900px){html,body{overflow:auto}.app{display:grid;grid-template-columns:1fr;height:auto;min-height:100vh;overflow:visible}.sidebar{max-height:none}.workspace{min-height:520px}.homePanels{padding:16px}.taskScope button{flex:1}.headerBtn{width:100%}}


/* v13: чаты как отдельный список в рабочей области + автофильтры задач */
#sideChats{display:none!important}.chatDirectory{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:18px;padding:22px;overflow:auto}.chatDirectory section{background:linear-gradient(180deg,#111c31,#0d1627);border:1px solid var(--line);border-radius:24px;padding:16px;min-width:0}.sectionHead{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}.sectionHead h3{margin:0;font-size:18px}.sectionHead span{background:#0b1424;border:1px solid var(--line);border-radius:999px;padding:4px 9px;color:var(--muted);font-size:12px}.chatDirectoryList{display:grid;gap:10px}.chatDirectoryRow{display:flex;align-items:center;gap:12px;border:1px solid var(--line);background:#0b1424;border-radius:18px;padding:12px;min-width:0;transition:.12s border-color,.12s background,.12s transform}.chatDirectoryRow:hover{border-color:#5064ff;background:#101d34;transform:translateY(-1px)}.chatDirectoryRow.active{border-color:var(--brand2);background:#1a2540}.chatDirText{min-width:0;flex:1}.chatDirName{display:flex;align-items:center;gap:8px;min-width:0}.chatDirName b{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chatDirText small{display:block;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:4px}.roleBadge{display:inline-flex;align-items:center;border:1px solid #44537a;background:#14213a;color:#c7d5ee;border-radius:999px;padding:3px 8px;font-size:11px;font-weight:800;white-space:nowrap;vertical-align:middle}.roleBadge.group{background:#1f2a52;border-color:#5b5bf0}.chatMembers{display:flex;gap:7px;flex-wrap:wrap;align-items:center}.memberChip{display:inline-flex;align-items:center;gap:5px;color:var(--muted)}.meta .roleBadge{margin:0 5px}.taskToolbar{grid-template-columns:minmax(220px,1fr) 210px}.taskToolbar #taskFind{display:none}
@media(max-width:1160px){.chatDirectory{grid-template-columns:1fr}}
@media(max-width:900px){.chatDirectory{padding:16px}.chatDirName{align-items:flex-start;flex-direction:column;gap:4px}.roleBadge{max-width:100%;overflow:hidden;text-overflow:ellipsis}}
/* v14 profile editing */
.profileBtns{display:grid;gap:6px}.profileBtn,.logoutBtn{padding:8px 10px}.avatar img,.miniAvatar img,.chatAvatar img{width:100%;height:100%;object-fit:cover;border-radius:inherit;display:block}.avatarImg{overflow:hidden}.avatar.big{width:72px;height:72px;border-radius:22px;font-size:24px}.profileEditHead{display:flex;gap:14px;align-items:center;background:#09111f;border:1px solid var(--line);border-radius:18px;padding:14px;margin:12px 0 16px}.profileEditHead b,.profileEditHead small{display:block}.profileEditHead small{color:var(--muted);margin-top:3px}.profileBox{grid-template-columns:46px minmax(0,1fr) 78px}
@media(max-width:480px){.profileBox{grid-template-columns:46px minmax(0,1fr)}.profileBtns{grid-column:1 / -1;grid-template-columns:1fr 1fr}.avatar.big{width:60px;height:60px}}

/* v18: files in chats/tasks + article wording polish */
.fileBubble{display:flex;align-items:center;gap:10px;margin-top:10px;padding:10px 12px;border:1px solid #5064ff;border-radius:14px;background:#0b1424;color:#fff;text-decoration:none;max-width:100%;overflow:hidden}
.fileBubble:hover{background:#13213a}.fileBubble span{font-size:20px}.fileBubble b{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:14px}.taskFileRow{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:center;margin:10px 0}.attachBtn{width:46px;flex:0 0 46px;padding:0;font-size:18px}.composer .attachBtn{background:#0b1424;border-color:var(--line)}.composer .attachBtn:hover{border-color:var(--brand2);background:#17243c}
@media(max-width:640px){.taskFileRow{grid-template-columns:1fr}.taskFileRow button{width:100%}.composer{gap:8px;padding:12px}.attachBtn{width:42px;flex-basis:42px}.fileBubble b{white-space:normal}}

/* ZipChat desktop polish pass 1 */
:root{--bg:#090d14;--panel:#0d1320;--panel2:#101827;--card:#111827;--card2:#0b111c;--line:#263244;--text:#f4f7fb;--muted:#91a0b6;--brand:#6977ff;--brand2:#83a1ff;--ok:#2ac77e;--bad:#f05a6f;--warn:#e2a336}
button{border-radius:8px}
button:hover{transform:none}
input,textarea,select{border-radius:8px}
.logo,.brandLogo{border-radius:12px;background:linear-gradient(135deg,#5d6bff,#21b789)}
.app{grid-template-columns:360px minmax(0,1fr)}
.sidebar{padding:14px;background:#0c111b}
.brand{margin-bottom:12px}
.profileBox{border-radius:10px;padding:10px;background:#0b111c}
.profileBtns{gap:5px}
.profileBtn,.logoutBtn{border-radius:7px;padding:7px 8px;font-size:12px}
.nav{margin:8px 0;padding:8px 0;background:#0c111b}
.nav button,.quickActions button{border-radius:8px;padding:9px 10px}
.sideSection{margin-top:12px}
.item{border-radius:8px;padding:9px}
.miniAvatar{width:36px;height:36px;border-radius:10px}
.chatAvatar{width:44px;height:44px;border-radius:12px}
.groupAvatar{background:linear-gradient(135deg,#273247,#21b789)}
.chatHome,.chatLayout,.tasks{background:#090d14}
.header,.chatHeader{padding:14px 18px;background:#0d1320;border-bottom-color:#222b3a;backdrop-filter:none}
.chatHeader h2,.header h2{font-size:20px;line-height:1.15;margin:1px 0 3px}
.chatTitleBlock{gap:11px;min-width:0}
.chatHeading{min-width:0}
.chatKicker{color:var(--muted);font-size:12px;line-height:1.2}
.chatMembers{gap:5px;max-height:31px;overflow:hidden}
.memberChip{font-size:12px}
.roleBadge{border-radius:999px;padding:2px 7px;font-size:10px;line-height:1.35;background:#141d2c;border-color:#324057;color:#b9c6d8}
.chatDirectory{gap:14px;padding:16px}
.chatDirectory section{border-radius:10px;padding:12px;background:#0d1320}
.sectionHead{margin-bottom:9px}
.sectionHead h3{font-size:15px}
.chatDirectoryList{gap:7px}
.chatDirectoryRow{border-radius:8px;padding:9px;gap:10px;background:#0b111c}
.chatDirectoryRow:hover{background:#111a2a;transform:none}
.chatDirectoryRow.active{background:#172033}
.chatDirTop{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;min-width:0}
.chatDirName{flex:1}
.chatDirName b{font-size:14px;line-height:1.25}
.chatDirText small{font-size:12px;line-height:1.3;margin-top:3px;color:#9aa8bc}
.chatTime{flex:0 0 auto;color:#738198;font-size:11px;line-height:1.3}
.messages{padding:14px 18px;display:flex;flex-direction:column;gap:5px;background:#090d14}
.bubble{width:fit-content;max-width:min(560px,78%);margin:0;padding:8px 10px;border-radius:10px 10px 10px 4px;background:#111a2a;border-color:#263246;box-shadow:none;font-size:14px;line-height:1.38}
.bubble.mine{border-radius:10px 10px 4px 10px;background:#24306f;border-color:#5361df}
.meta{display:flex;align-items:center;gap:6px;flex-wrap:wrap;color:#a9b6ca;font-size:11px;line-height:1.2;margin-bottom:3px}
.meta .sender{color:#dbe5f5;font-weight:750}
.meta time{color:#76849a}
.meta .roleBadge{margin:0;max-width:140px;overflow:hidden;text-overflow:ellipsis}
.messageText{white-space:pre-wrap}
.composer{gap:8px;padding:10px 14px;background:#0d1320;border-top-color:#222b3a}
.composer input{min-height:40px;padding:10px 12px}
.composer button{min-height:40px;border-radius:8px;padding:0 13px}
.attachBtn{width:40px;flex:0 0 40px}
.fileBubble{margin-top:7px;border-radius:8px;padding:8px 10px}
.imageBubble{display:block;margin-top:7px;padding:0;border:1px solid #2d3a50;background:#080d15;border-radius:8px;overflow:hidden;max-width:min(340px,100%);cursor:zoom-in}
.imageBubble:hover{border-color:#83a1ff;background:#080d15}
.imageBubble img{display:block;max-width:100%;max-height:260px;object-fit:cover}
.imagePreview{display:grid;gap:12px}
.imagePreviewTop{display:flex;align-items:center;justify-content:space-between;gap:16px;color:var(--text);padding-right:44px}
.imagePreviewTop a{color:#cdd7ff;text-decoration:none;border:1px solid var(--line);border-radius:8px;padding:8px 10px}
.imagePreview img{display:block;max-width:100%;max-height:72vh;object-fit:contain;border-radius:10px;background:#05070b}
.modalCard:has(.imagePreview){width:min(1080px,94vw);padding:14px;background:#080d15}
@media(max-width:1160px){.app{grid-template-columns:320px minmax(0,1fr)}.bubble{max-width:min(560px,86%)}}

/* ZipChat sidebar and tasks polish pass 2 */
.adminOpen{width:100%;justify-content:center;background:#0b111c;border-color:#334159;color:#d7e0ef}
.adminOpen:hover{background:#121c2c;border-color:#83a1ff}
.adminModalIntro{color:var(--muted);margin:-4px 0 14px}
.adminDirectory{display:grid;gap:10px}
.adminDirectory .adminItem{border-radius:10px;background:#0b111c}
.adminDirectory .adminTop{align-items:flex-start}
.adminDirectory .adminTop>div{min-width:0}
.adminDirectory .adminTop b,.adminDirectory .adminTop small{display:block;overflow:hidden;text-overflow:ellipsis}
.adminDirectory .adminBtns{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.adminDirectory .adminBtns button{min-width:0}
.tasks{padding:16px 18px;background:#080c13}
.taskHeader{min-height:82px}
.taskScope{display:inline-flex;gap:6px;flex-wrap:wrap;margin:0 0 12px;padding:4px;border:1px solid #222d3f;border-radius:10px;background:#0b111c}
.taskScope button{border:0;background:transparent;border-radius:7px;padding:8px 12px;color:#aebbd0}
.taskScope button.active{background:#1a2440;border-color:transparent;color:#fff;box-shadow:inset 0 0 0 1px #5b74ff}
.taskToolbar{display:grid;grid-template-columns:minmax(260px,1fr) 190px;gap:10px;margin-bottom:12px}
.taskToolbar input,.taskToolbar select{height:42px;background:#0b111c}
.summary{display:grid;grid-template-columns:repeat(5,minmax(120px,1fr));gap:8px;margin-bottom:12px}
.summary div{border-radius:8px;padding:10px 12px;background:#0b111c}
.summary b{font-size:22px;line-height:1.1}
.summary span{font-size:12px}
.task{position:relative;grid-template-columns:minmax(0,1fr) 128px;gap:14px;margin:9px 0;padding:14px 16px;border-radius:10px;background:#0d1421;box-shadow:none}
.task:hover{border-color:#3d4f6b;background:#111a29}
.taskTitle{gap:7px;margin-bottom:8px}
.taskTitle h3{font-size:16px;line-height:1.25}
.taskId{border-radius:7px;padding:4px 7px;font-size:12px;background:#0a101a}
.pill{border-radius:999px;padding:4px 8px;font-size:11px}
.taskMetaGrid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:6px 0 8px}
.taskMetaGrid span{display:block;min-width:0;color:#8e9db3;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.taskMetaGrid b{color:#d5deec;font-weight:650}
.skuTitle{font-size:11px;margin:7px 0 4px;text-transform:uppercase;letter-spacing:.08em}
.skuWrap{gap:5px;margin:5px 0 7px}
.skuChip{border-radius:7px;padding:5px 8px;font-size:12px;background:#111b2c}
.taskDesc{border-radius:8px;padding:9px 10px;margin-top:8px;font-size:13px;background:#0a101a}
.taskActions{gap:7px;min-width:0}
.taskActions button{border-radius:7px;padding:8px 10px;font-size:13px}
.taskActions small{font-size:11px;line-height:1.25}
.emptySmall{border-radius:10px;padding:28px;background:#080c13}
@media(max-width:1220px){.taskMetaGrid{grid-template-columns:repeat(2,minmax(0,1fr))}.summary{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:900px){.taskToolbar{grid-template-columns:1fr}.task{grid-template-columns:1fr}.taskActions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.taskActions small{grid-column:1 / -1}.summary{grid-template-columns:1fr 1fr}}

/* ZipChat responsive and modal polish pass 3 */
.sectionToggle{width:100%;display:flex;align-items:center;justify-content:space-between;gap:10px;border:0;background:transparent;padding:0;margin:0 0 9px;color:var(--muted);font-size:12px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}
.sectionToggle:hover{background:transparent;border-color:transparent}
.sectionToggle span:last-child{display:inline-grid;place-items:center;min-width:28px;height:28px;border:1px solid var(--line);border-radius:999px;background:#0b111c;color:#aebbd0;letter-spacing:0}
.chatHeader{display:flex;align-items:center;justify-content:space-between;gap:12px}
.chatHeaderBtn{flex:0 0 auto;border-radius:8px;padding:8px 12px;background:#0b111c;color:#d7e0ef}
.headerBtn,.primary,.secondary{min-height:40px;line-height:1.2;white-space:normal}
.taskHeader{min-height:auto}
.taskHeader .headerBtn{width:min(320px,42vw)}
.taskToolbar select{min-width:0;padding-right:36px;line-height:1.2;white-space:nowrap;text-overflow:ellipsis}
.taskToolbar input{min-width:0}
.groupForm{display:grid;gap:14px}
.groupForm input{height:46px}
.memberPicker{display:grid;gap:8px;max-height:min(46vh,420px);overflow:auto;padding:2px}
.memberPick{display:grid;grid-template-columns:40px minmax(0,1fr) 22px;align-items:center;gap:10px;border:1px solid var(--line);background:#0b111c;border-radius:10px;padding:9px 10px;color:var(--text)}
.memberPick.readonly{grid-template-columns:40px minmax(0,1fr)}
.memberPick span{min-width:0}
.memberPick b,.memberPick small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.memberPick small{color:var(--muted);margin-top:2px}
.memberPick input{width:18px;height:18px;justify-self:end;accent-color:var(--brand)}
.groupMembersModal{display:grid;gap:12px}
.groupMembersModal h3{margin:6px 0 0;font-size:14px;color:var(--muted);text-transform:uppercase;letter-spacing:.08em}
.modalCard{border-radius:14px}
.modalCard h2{margin:4px 44px 16px 0;font-size:24px;line-height:1.15}
.x{width:40px;height:40px;border-radius:8px;padding:0}
@media(max-width:1100px){
  .app{grid-template-columns:300px minmax(0,1fr)}
  .sidebar{padding:12px}
  .profileBox{grid-template-columns:42px minmax(0,1fr);gap:9px}
  .profileBtns{grid-column:1 / -1;grid-template-columns:1fr 1fr}
  .quickActions button{font-size:14px}
  .taskHeader .headerBtn{width:auto}
}
@media(max-width:760px){
  html,body{overflow:auto}
  .app{display:grid;grid-template-columns:1fr;height:auto;min-height:100dvh;overflow:visible}
  .sidebar{position:relative;max-height:none;border-right:0;border-bottom:1px solid var(--line)}
  .workspace{min-height:60dvh;overflow:visible}
  .brandLogo{width:44px;height:44px}
  .brand{margin-bottom:10px}
  .profileBox{grid-template-columns:42px minmax(0,1fr);border-radius:10px}
  .nav,.quickActions{grid-template-columns:1fr 1fr}
  .quickActions{gap:7px}
  .quickActions button{padding:9px 8px}
  .sideSection{margin-top:10px}
  .employeesSection #employeesPanel.hidden{display:none!important}
  .header,.chatHeader{padding:12px;align-items:stretch}
  .header{flex-direction:column}
  .chatHeader{flex-wrap:wrap}
  .chatTitleBlock{flex:1 1 min(100%,360px)}
  .chatHeaderBtn{width:100%}
  .chatDirectory{padding:12px;grid-template-columns:1fr}
  .messages{padding:12px}
  .bubble{max-width:92%;font-size:13px}
  .composer{position:sticky;bottom:0;padding:9px;z-index:3}
  .composer button{padding:0 10px}
  .tasks{padding:12px}
  .taskScope{display:grid;grid-template-columns:1fr 1fr 1fr;width:100%}
  .taskScope button{padding:8px 6px;font-size:13px}
  .summary{grid-template-columns:1fr 1fr}
  .taskMetaGrid{grid-template-columns:1fr}
  .taskActions{grid-template-columns:1fr}
  .taskToolbar select{height:44px}
  .modal{align-items:end}
  .modalCard{width:100vw;max-height:92dvh;border-radius:16px 16px 0 0;padding:18px}
  .memberPicker{max-height:42dvh}
}
@media(max-width:460px){
  .sidebar{padding:10px}
  .brand span,.profileText span{font-size:12px}
  .nav button{font-size:13px}
  .quickActions{grid-template-columns:1fr}
  .summary{grid-template-columns:1fr}
  .taskScope{grid-template-columns:1fr}
  .taskTitle h3{font-size:15px}
  .task{padding:12px}
  .composer input{min-width:0}
  .composer button#sendBtn{max-width:96px;overflow:hidden;text-overflow:ellipsis}
}

/* ZipChat SaaS polish pass 4 */
:root{
  --bg:#070a0f;
  --panel:#0d121a;
  --panel2:#111823;
  --card:#101720;
  --card2:#0a0f16;
  --line:#253041;
  --line2:#344154;
  --text:#f6f8fb;
  --muted:#95a2b5;
  --soft:#c9d2df;
  --brand:#5867e8;
  --brand2:#7b8cff;
  --ok:#28b978;
  --bad:#e45167;
  --warn:#d99b2b;
  --shadow:0 24px 70px rgba(0,0,0,.38);
}
body{background:var(--bg);color:var(--text);font-size:14px;line-height:1.45}
button,input,select,textarea{font-size:14px}
button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid rgba(123,140,255,.55);outline-offset:2px}
button{border-radius:8px;background:#0c121b;border-color:var(--line);color:#edf2fa}
button:hover{border-color:var(--brand2);background:#121b29}
input,textarea,select{background:#090e15;border-color:var(--line);color:var(--text);border-radius:8px}
input::placeholder,textarea::placeholder{color:#6f7b8d}
.primary,.composer button,.headerBtn{background:var(--brand);border-color:var(--brand);color:#fff;font-weight:760}
.secondary{background:#162033;border-color:#314057;color:#eef3fb}
.auth{background:radial-gradient(circle at 50% -16%,rgba(88,103,232,.36),transparent 34%),linear-gradient(180deg,#0b1018,#070a0f)}
.card{border-radius:18px;background:rgba(13,18,26,.96);padding:30px;box-shadow:var(--shadow)}
.card h1{margin:16px 0 4px;font-size:30px;letter-spacing:0}
.card p{margin:0 0 18px;color:var(--muted)}
.tabs{padding:4px;background:#090e15;border:1px solid var(--line);border-radius:10px;margin-bottom:4px}
.tabs button{border:0;background:transparent;border-radius:7px;margin-top:0}
.tabs .active{background:#182238;border-color:transparent}
.app{grid-template-columns:336px minmax(0,1fr);background:var(--bg)}
.sidebar{display:flex;flex-direction:column;gap:10px;background:#0b1018;border-right-color:#1e2735;padding:14px;overflow:hidden}
.brand{flex:0 0 auto;margin:0;padding:2px 2px 6px}
.brand>div:nth-child(2){min-width:0}
.notifBtn{margin-left:auto;position:relative;min-width:42px;height:36px;padding:0 10px;border-radius:8px;background:#0a0f16;color:#c7d1df;font-size:12px}
.brandLogo,.logo{background:linear-gradient(135deg,#5968e8,#22a878);border-radius:10px}
.profileBox{flex:0 0 auto;grid-template-columns:42px minmax(0,1fr) 74px;border-radius:10px;background:#0f1620;border-color:#202b3a}
.avatar{width:42px;height:42px;border-radius:10px;background:linear-gradient(135deg,#202b3d,#5968e8)}
.profileText b{font-size:14px}
.profileText span{font-size:12px;line-height:1.35}
.profileBtns{grid-template-columns:1fr;gap:5px}
.profileBtn,.logoutBtn{height:30px;padding:0 8px}
.nav{position:static;flex:0 0 auto;margin:0;padding:4px;background:#090e15;border:1px solid var(--line);border-radius:10px;grid-template-columns:1fr 1fr}
.nav button{border:0;background:transparent;border-radius:7px;padding:8px 6px}
.nav button,.notifBtn{position:relative}
.nav .active{background:#182238;border-color:transparent}
.badge{display:inline-grid;place-items:center;min-width:20px;height:20px;padding:0 6px;border-radius:999px;background:#ef4058;color:#fff;font-size:11px;font-weight:850;line-height:1;box-shadow:0 0 0 2px #0b1018}
.nav .badge,.notifBtn .badge{position:absolute;right:5px;top:-7px}
.quickActions{flex:0 0 auto;margin:0;grid-template-columns:1fr 1fr;gap:8px}
.quickActions button{min-height:38px;padding:8px 9px;font-size:13px}
.sideSection{margin-top:0}
.employeesSection{min-height:0;display:flex;flex-direction:column}
#employeesPanel{min-height:0;display:flex;flex-direction:column;gap:8px}
#userSearch{height:38px;flex:0 0 auto}
#userList{min-height:0;overflow:auto;padding-right:2px}
.sectionTitle h4,h4{margin:4px 0 8px;color:#7f8ca0}
.sectionToggle{margin:0;color:#8592a7}
.sectionToggle span:last-child{height:24px;min-width:24px}
.item,.chatDirectoryRow{border-radius:8px;background:#0f1620;border-color:#202b3a}
.item:hover,.chatDirectoryRow:hover{background:#131d2b;border-color:#3a4b64}
.item.active,.chatDirectoryRow.active{background:#182238;border-color:#6577ff}
.sideEmpty,.emptySmall{display:grid;gap:5px;border-radius:10px;background:#0a0f16;border-color:#2c3747;color:var(--muted)}
.emptySmall b{color:#dfe6f0}
.emptySmall span{display:block;color:var(--muted)}
.adminOpen{height:38px}
.workspace{background:#070a0f}
.header,.chatHeader{min-height:64px;padding:14px 18px;background:#0d121a;border-bottom-color:#1f2836}
.header h2,.chatHeader h2{font-size:20px;letter-spacing:0}
.chatDirectory{grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr);gap:12px;padding:14px;background:#070a0f}
.chatDirectory section{border-radius:10px;background:#0d121a;border-color:#202b3a;padding:12px}
.sectionHead h3{font-size:14px}
.sectionHead span{background:#090e15;border-color:#253041}
.chatDirTop{align-items:center}
.chatRowMeta{display:flex;align-items:center;gap:7px;flex:0 0 auto}
.chatDirName{gap:6px}
.chatDirName b{font-weight:760}
.hasUnread{border-color:#465a7a;background:#121b29}
.hasUnread .chatDirName b{color:#fff}
.chatUnread{position:static;box-shadow:none}
.chatDirText small{color:#8997aa}
.chatTime{color:#728096}
.miniAvatar{width:34px;height:34px;border-radius:9px}
.chatAvatar{width:42px;height:42px;border-radius:10px}
.roleBadge{background:#131c2a;border-color:#2d3a4d;color:#c3cedc}
.dot{width:7px;height:7px}
.chatLayout{background:#070a0f}
.chatMembers{color:var(--muted)}
.chatHeading:has(.chatMembers:empty) .chatMembers{display:none}
.messages{padding:16px 18px;gap:4px;background:linear-gradient(180deg,#080c12,#070a0f)}
.bubble{max-width:min(580px,72%);padding:8px 10px;border-radius:11px 11px 11px 4px;background:#111925;border-color:#243145;color:#eef3fb}
.bubble.mine{background:#293176;border-color:#5968e8}
.meta{margin-bottom:2px;color:#9facbf}
.messageText{font-size:14px}
.composer{padding:10px 14px;background:#0d121a;border-top-color:#1f2836}
.composer input{height:40px}
.composer button{height:40px}
.attachBtn{height:40px}
.tasks{background:#070a0f;padding:14px 18px}
.taskScope{margin-bottom:12px;border-radius:10px;background:#090e15;border-color:#202b3a}
.taskScope button{color:#a8b4c6}
.taskScope button.active{background:#182238;color:#fff;box-shadow:inset 0 0 0 1px rgba(123,140,255,.7)}
.taskToolbar{grid-template-columns:minmax(240px,1fr) 190px;gap:10px}
.summary{grid-template-columns:repeat(5,minmax(110px,1fr));gap:8px}
.summary div{border-radius:9px;background:#0d121a;border-color:#202b3a;padding:11px 12px}
.summary span{display:block;margin-bottom:4px;color:#8592a7;text-transform:none}
.summary b{font-size:24px}
.task{grid-template-columns:minmax(0,1fr) 118px;margin:8px 0;padding:14px;border-radius:10px;background:#0d121a;border-color:#202b3a}
.task:hover{background:#111925;border-color:#36475f}
.taskDone{opacity:.62}
.taskTitle{align-items:center;margin-bottom:9px}
.taskTitle h3{font-size:16px}
.taskId{background:#080d14;border-color:#263246;color:#aab8ca}
.pill{padding:4px 8px}
.snew{background:#172a4b;color:#d8e7ff}
.swork{background:#493a16;color:#ffe8b5}
.swait{background:#302346;color:#e8d9ff}
.sdone{background:#0d3c2a;color:#b9f2d7}
.purgent{background:#702033;color:#ffe3e9}
.phigh{background:#604116;color:#ffe0aa}
.pnormal{background:#21375a;color:#dbe9ff}
.plow{background:#1e3b2f;color:#cff6e2}
.taskMetaGrid{grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.taskMetaGrid span{color:#8390a2}
.taskMetaGrid b{display:block;color:#d7e0ec;margin-top:1px;overflow:hidden;text-overflow:ellipsis}
.skuLine{display:flex;align-items:flex-start;gap:8px;min-width:0;margin-top:8px}
.skuLine>span{flex:0 0 auto;margin-top:4px;color:#7f8ca0;font-size:12px;text-transform:uppercase;letter-spacing:.04em}
.skuLine .skuWrap{margin:0}
.skuChip{border:1px solid #2b3850;background:#111b2a;color:#dfe8f4;border-radius:7px;padding:5px 8px}
.taskDesc{margin-top:10px;border-radius:8px;background:#090e15;border-color:#202b3a;color:#c7d1df}
.taskFoot{display:flex;gap:10px;flex-wrap:wrap;margin-top:10px;color:#748197;font-size:12px}
.taskActions{gap:7px}
.taskActions button{min-height:34px}
.doneBtn{background:#147348;border-color:#1f9460}
.modal{background:rgba(0,0,0,.64);padding:18px}
.modalCard{width:min(880px,94vw);border-radius:14px;background:#0d121a;border-color:#283447;padding:22px;box-shadow:var(--shadow)}
.modalCard h2{font-size:22px;margin-bottom:16px}
.x{background:#090e15;border-color:#263246}
.formgrid{gap:10px}
.modal label,.formgrid label{color:#93a0b2;font-size:12px;font-weight:720}
.modalActions{display:flex;justify-content:flex-end;gap:8px;margin-top:8px}
.modalActions button{min-width:110px}
.profileModal{display:grid;grid-template-columns:240px minmax(0,1fr);gap:16px}
.profilePreview{display:flex;flex-direction:column;gap:8px;align-items:flex-start;background:linear-gradient(180deg,#121b28,#0a0f16);border:1px solid var(--line);border-radius:12px;padding:16px;min-width:0}
.profilePreview b{font-size:18px;line-height:1.2;overflow-wrap:anywhere}
.profilePreview span,.profilePreview small{color:var(--muted);overflow-wrap:anywhere}
.profileStat{width:100%;margin-top:auto;padding-top:12px;border-top:1px solid var(--line)}
.profileStat span{display:block;font-size:12px}
.profileStat b{display:block;margin-top:2px;font-size:14px}
.avatar.big{width:78px;height:78px;border-radius:18px;font-size:28px}
.profileForm{min-width:0}
.profileForm input[readonly]{color:#9ba8ba;background:#080d14}
.memberPicker{padding-right:4px}
.memberPick{border-radius:9px;background:#0a0f16}
.imageBubble{border-radius:9px}
.imagePreviewTop a{border-radius:8px}
.toast{border-radius:10px;background:#0e1622;border-color:#5867e8}
.notificationPanel{display:grid;gap:12px}
.notificationPerm{width:100%;text-align:left;background:#0a0f16;border-color:#263246;color:#c7d1df}
.notificationSummary{display:flex;gap:8px;flex-wrap:wrap}
.notificationSummary span{display:inline-flex;gap:5px;align-items:center;border:1px solid var(--line);background:#0a0f16;border-radius:999px;padding:6px 10px;color:#aebbd0}
.notificationList{display:grid;gap:8px;max-height:min(52vh,430px);overflow:auto;padding-right:2px}
.notificationItem{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:start;border:1px solid var(--line);background:#0a0f16;border-radius:10px;padding:11px 12px;cursor:pointer}
.notificationItem:hover{border-color:#5867e8;background:#101826}
.notificationItem.unread{border-color:#5364dd;background:#121b30}
.notificationItem b,.notificationItem small{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis}
.notificationItem small{margin-top:3px;color:#9ca9ba;white-space:nowrap}
.notificationItem time{color:#748197;font-size:12px;white-space:nowrap}
@media(max-width:1180px){
  .app{grid-template-columns:304px minmax(0,1fr)}
  .quickActions{grid-template-columns:1fr}
  .summary{grid-template-columns:repeat(2,minmax(0,1fr))}
  .taskMetaGrid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:860px){
  html,body{overflow:auto}
  .app{grid-template-columns:1fr;height:auto;min-height:100dvh;overflow:visible}
  .sidebar{position:relative;top:auto;z-index:10;max-height:none;border-right:0;border-bottom:1px solid #1e2735;overflow:visible}
  .workspace{min-height:54dvh}
  .profileBox{grid-template-columns:42px minmax(0,1fr) 74px}
  .quickActions{grid-template-columns:1fr 1fr}
  .employeesSection{display:block}
  #employeesPanel{display:grid}
  #userList{max-height:150px;overflow:auto}
  .chatDirectory{grid-template-columns:1fr;padding:12px}
  .chatHeader,.header{padding:12px}
  .bubble{max-width:92%}
  .composer{position:sticky;bottom:0}
  .taskToolbar{grid-template-columns:1fr}
  .task{grid-template-columns:1fr}
  .taskActions{grid-template-columns:repeat(3,minmax(0,1fr));display:grid}
  .profileModal{grid-template-columns:1fr}
  .profilePreview{display:grid;grid-template-columns:78px minmax(0,1fr);align-items:center}
  .profilePreview .profileStat{grid-column:1 / -1}
  .modal{align-items:end;padding:0}
  .modalCard{width:100vw;max-height:92dvh;border-radius:16px 16px 0 0;padding:18px}
}
@media(max-width:520px){
  body{font-size:13px}
  .sidebar{max-height:none;padding:10px}
  .brandLogo{width:40px;height:40px}
  .notifBtn{font-size:0;width:40px;padding:0}
  .notifBtn::before{content:"!";font-size:16px;font-weight:900}
  .profileBox{grid-template-columns:40px minmax(0,1fr)}
  .profileBtns{grid-column:1 / -1;grid-template-columns:1fr 1fr}
  .nav,.quickActions{grid-template-columns:1fr 1fr}
  .quickActions button{font-size:12px}
  .chatDirTop{align-items:flex-start}
  .chatDirName{flex-direction:column;align-items:flex-start}
  .chatTime{font-size:10px}
  .notificationItem{grid-template-columns:1fr}
  .notificationItem small{white-space:normal}
  .messages{padding:10px}
  .bubble{max-width:96%;font-size:13px}
  .composer{grid-template-columns:40px minmax(0,1fr) auto;display:grid}
  .composer input{min-width:0}
  .composer button#sendBtn{width:auto;max-width:82px;padding:0 8px}
  .tasks{padding:10px}
  .taskScope{display:grid;grid-template-columns:1fr}
  .summary,.taskMetaGrid{grid-template-columns:1fr}
  .skuLine{display:block}
  .skuLine>span{display:block;margin-bottom:5px}
  .taskActions{grid-template-columns:1fr}
  .split{grid-template-columns:1fr}
  .modalActions{display:grid;grid-template-columns:1fr 1fr}
}

/* ZipChat Modern Glass theme pass 5 */
:root{
  color-scheme:light;
  --bg:#eef7ff;
  --bg2:#f7f4ff;
  --bg3:#fff8f2;
  --panel:rgba(255,255,255,.58);
  --panel-strong:rgba(255,255,255,.78);
  --panel-solid:#ffffff;
  --card:rgba(255,255,255,.66);
  --card2:rgba(255,255,255,.5);
  --line:rgba(118,135,172,.22);
  --line2:rgba(86,104,145,.32);
  --text:#101b33;
  --muted:#66738b;
  --soft:#7f8da8;
  --brand:#4f76ff;
  --brand2:#8b5cf6;
  --brand3:#29b7d8;
  --ok:#20b981;
  --bad:#ef4d68;
  --warn:#f59e32;
  --shadow:0 22px 70px rgba(67,88,126,.18);
  --glass-blur:24px;
}
[data-theme="dark"]{
  color-scheme:dark;
  --bg:#07111f;
  --bg2:#10172a;
  --bg3:#151022;
  --panel:rgba(16,25,42,.64);
  --panel-strong:rgba(17,26,44,.82);
  --panel-solid:#111a2b;
  --card:rgba(17,27,45,.68);
  --card2:rgba(12,20,34,.58);
  --line:rgba(153,174,213,.16);
  --line2:rgba(155,176,218,.26);
  --text:#f7f9ff;
  --muted:#9aa8bf;
  --soft:#c5cfdd;
  --brand:#6d8cff;
  --brand2:#9b72ff;
  --brand3:#38c5e6;
  --ok:#31d094;
  --bad:#ff6078;
  --warn:#f4ad45;
  --shadow:0 26px 80px rgba(0,0,0,.36);
}
html,body{background:var(--bg);color:var(--text)}
body{
  background:
    radial-gradient(circle at 18% 14%, color-mix(in srgb,var(--brand3) 28%, transparent), transparent 34%),
    radial-gradient(circle at 84% 8%, color-mix(in srgb,var(--brand2) 24%, transparent), transparent 32%),
    radial-gradient(circle at 72% 88%, color-mix(in srgb,var(--warn) 12%, transparent), transparent 30%),
    linear-gradient(135deg,var(--bg),var(--bg2) 52%,var(--bg3));
}
[data-theme="dark"] body{
  background:
    radial-gradient(circle at 16% 12%, rgba(49,122,255,.24), transparent 34%),
    radial-gradient(circle at 86% 8%, rgba(139,92,246,.18), transparent 34%),
    radial-gradient(circle at 72% 84%, rgba(29,185,210,.12), transparent 30%),
    linear-gradient(135deg,var(--bg),var(--bg2) 58%,var(--bg3));
}
button,input,select,textarea{color:var(--text)}
button{
  border-radius:999px;
  border-color:var(--line);
  background:rgba(255,255,255,.48);
  color:var(--text);
  box-shadow:0 1px 0 rgba(255,255,255,.35) inset;
}
[data-theme="dark"] button{background:rgba(15,24,40,.72);box-shadow:0 1px 0 rgba(255,255,255,.06) inset}
button:hover{background:var(--panel-strong);border-color:var(--line2);box-shadow:0 10px 26px rgba(76,104,160,.12)}
input,textarea,select{
  border-radius:999px;
  border-color:var(--line);
  background:rgba(255,255,255,.72);
  color:var(--text);
  box-shadow:0 1px 0 rgba(255,255,255,.42) inset;
}
textarea{border-radius:22px}
[data-theme="dark"] input,[data-theme="dark"] textarea,[data-theme="dark"] select{background:rgba(9,16,29,.72);box-shadow:0 1px 0 rgba(255,255,255,.04) inset}
input::placeholder,textarea::placeholder{color:color-mix(in srgb,var(--muted) 82%, transparent)}
.primary,.composer button,.headerBtn{
  border:0;
  color:#fff;
  background:linear-gradient(135deg,var(--brand),var(--brand2));
  box-shadow:0 12px 28px color-mix(in srgb,var(--brand) 28%, transparent);
}
.secondary{
  background:var(--panel);
  border-color:var(--line);
  color:var(--text);
}
.app{
  width:100vw;
  height:100vh;
  padding:12px;
  gap:10px;
  grid-template-columns:306px minmax(0,1fr);
  background:transparent;
}
.sidebar,.workspace,.modalCard,.card,.chatDirectory section,.homePanel,.task,.summary div,.profileBox,.item,.chatDirectoryRow,.taskCardMeta,.comment,.event,.descBox,.taskDesc,.notificationItem,.memberPick,.emptySmall,.sideEmpty{
  backdrop-filter:blur(var(--glass-blur));
  -webkit-backdrop-filter:blur(var(--glass-blur));
}
.sidebar{
  border:1px solid var(--line);
  border-radius:26px;
  background:linear-gradient(180deg,var(--panel-strong),var(--panel));
  box-shadow:var(--shadow);
  padding:16px;
  overflow:hidden;
}
.workspace{
  border:1px solid var(--line);
  border-radius:26px;
  overflow:hidden;
  background:linear-gradient(145deg,var(--panel),rgba(255,255,255,.3));
  box-shadow:var(--shadow);
}
[data-theme="dark"] .workspace{background:linear-gradient(145deg,var(--panel),rgba(13,21,36,.35))}
.brand{
  align-items:center;
  gap:12px;
  padding:0 0 10px;
}
.brandLogo,.logo,.avatar,.miniAvatar,.chatAvatar,.avatar.big,.themeToggle,.notifBtn,.attachBtn{
  border-radius:999px!important;
}
.brandLogo,.logo{
  width:46px;
  height:46px;
  color:#fff;
  background:linear-gradient(135deg,#64a7ff,#6b5cff 52%,#23c6a7);
  box-shadow:0 12px 28px rgba(76,111,225,.24);
}
.brand b{color:var(--text);font-size:16px}
.brand span{color:var(--muted)}
.themeToggle,.notifBtn{
  width:38px;
  min-width:38px;
  height:38px;
  padding:0;
  display:grid;
  place-items:center;
  background:rgba(255,255,255,.62);
  border-color:var(--line);
  color:var(--text);
  font-size:15px;
}
[data-theme="dark"] .themeToggle,[data-theme="dark"] .notifBtn{background:rgba(10,17,30,.68)}
.notifBtn{font-size:0}
.notifBtn::before{content:"!";font-size:15px;font-weight:900}
.profileBox{
  border-color:var(--line);
  border-radius:22px;
  background:var(--card);
  box-shadow:0 12px 30px rgba(64,86,130,.08);
}
.avatar,.miniAvatar,.chatAvatar{
  background:linear-gradient(135deg,#5b7cff,#8b5cf6);
  color:#fff;
  box-shadow:0 9px 20px rgba(75,96,210,.22);
}
.avatar{width:44px;height:44px}
.miniAvatar{width:36px;height:36px}
.chatAvatar{width:54px;height:54px}
.profileText b,.itemText b,.chatDirName b{color:var(--text)}
.profileText span,.item small,.itemText small{color:var(--muted)}
.profileBtn,.logoutBtn,.adminOpen,.chatHeaderBtn{
  border-radius:999px;
  background:rgba(255,255,255,.52);
  color:var(--text);
}
[data-theme="dark"] .profileBtn,[data-theme="dark"] .logoutBtn,[data-theme="dark"] .adminOpen,[data-theme="dark"] .chatHeaderBtn{background:rgba(10,17,30,.66)}
.nav{
  border:1px solid var(--line);
  border-radius:999px;
  background:rgba(255,255,255,.42);
  padding:5px;
  box-shadow:0 10px 28px rgba(73,96,146,.08);
}
[data-theme="dark"] .nav{background:rgba(10,17,30,.56)}
.nav button{
  border-radius:999px;
  color:var(--muted);
  min-height:36px;
}
.nav .active,.tabs .active,.taskScope button.active{
  background:rgba(255,255,255,.82);
  color:var(--brand);
  box-shadow:0 10px 26px rgba(72,101,177,.12);
}
[data-theme="dark"] .nav .active,[data-theme="dark"] .tabs .active,[data-theme="dark"] .taskScope button.active{
  background:rgba(40,56,91,.78);
  color:#fff;
}
.quickActions{gap:8px}
.quickActions button{border-radius:999px;min-height:40px}
.sectionToggle{color:var(--soft)}
.sectionToggle span:last-child,.sectionTitle span,.sectionHead span{
  border-radius:999px;
  background:rgba(255,255,255,.52);
  border-color:var(--line);
  color:var(--muted);
}
[data-theme="dark"] .sectionToggle span:last-child,[data-theme="dark"] .sectionTitle span,[data-theme="dark"] .sectionHead span{background:rgba(10,17,30,.68)}
#userSearch{border-radius:999px}
.item,.chatDirectoryRow{
  border-color:var(--line);
  border-radius:20px;
  background:var(--card);
  box-shadow:0 10px 24px rgba(73,96,146,.06);
}
.item:hover,.chatDirectoryRow:hover{
  background:var(--panel-strong);
  border-color:var(--line2);
  transform:translateY(-1px);
}
.item.active,.chatDirectoryRow.active,.hasUnread{
  background:linear-gradient(135deg,color-mix(in srgb,var(--brand) 13%, var(--panel-solid)),var(--panel-strong));
  border-color:color-mix(in srgb,var(--brand) 38%, var(--line));
}
.badge{
  border-radius:999px;
  background:linear-gradient(135deg,#ff4776,#ff7a59);
  box-shadow:0 0 0 3px color-mix(in srgb,var(--panel-solid) 80%, transparent),0 8px 18px rgba(239,64,88,.22);
}
.workspace .header,.workspace .chatHeader{
  border-bottom:1px solid var(--line);
  background:linear-gradient(135deg,rgba(255,255,255,.5),rgba(255,255,255,.22));
}
[data-theme="dark"] .workspace .header,[data-theme="dark"] .workspace .chatHeader{background:linear-gradient(135deg,rgba(16,25,42,.72),rgba(16,25,42,.35))}
.header h2,.chatHeader h2{color:var(--text);font-size:22px}
.header div,.chatKicker{color:var(--muted)}
.chatHome,.chatLayout,.tasks{
  background:transparent;
}
.chatDirectory{
  padding:18px;
  gap:14px;
  background:transparent;
}
.chatDirectory section{
  border:1px solid var(--line);
  border-radius:24px;
  background:var(--card);
  box-shadow:0 16px 42px rgba(74,102,160,.09);
}
.sectionHead h3{color:var(--text)}
.roleBadge{
  border-radius:999px;
  border-color:color-mix(in srgb,var(--brand) 22%, var(--line));
  background:color-mix(in srgb,var(--brand) 9%, rgba(255,255,255,.62));
  color:color-mix(in srgb,var(--brand) 72%, var(--text));
}
[data-theme="dark"] .roleBadge{background:rgba(61,81,128,.38);color:#dce6ff}
.groupAvatar{background:linear-gradient(135deg,#46c2e6,#32c69a)}
.messages{
  background:
    radial-gradient(circle at 80% 0%, color-mix(in srgb,var(--brand2) 10%, transparent), transparent 32%),
    transparent;
}
.bubble{
  border-radius:20px 20px 20px 8px;
  border-color:var(--line);
  background:rgba(255,255,255,.78);
  color:var(--text);
  box-shadow:0 10px 26px rgba(73,96,146,.08);
}
[data-theme="dark"] .bubble{background:rgba(16,25,42,.82)}
.bubble.mine{
  border-color:transparent;
  background:linear-gradient(135deg,var(--brand),var(--brand2));
  color:#fff;
  border-radius:20px 20px 8px 20px;
}
.bubble.mine .meta,.bubble.mine .sender,.bubble.mine time{color:rgba(255,255,255,.82)}
.meta{color:var(--muted)}
.meta .sender{color:var(--text)}
.composer{
  border-top:1px solid var(--line);
  background:rgba(255,255,255,.52);
}
[data-theme="dark"] .composer{background:rgba(10,17,30,.58)}
.composer input{border-radius:999px}
.composer button,.attachBtn{border-radius:999px}
.attachBtn{
  background:rgba(255,255,255,.65)!important;
  border-color:var(--line)!important;
  color:var(--text);
}
[data-theme="dark"] .attachBtn{background:rgba(10,17,30,.72)!important}
.taskScope{
  border-radius:999px;
  border-color:var(--line);
  background:rgba(255,255,255,.46);
  padding:5px;
}
[data-theme="dark"] .taskScope{background:rgba(10,17,30,.58)}
.taskScope button{border-radius:999px;color:var(--muted)}
.taskToolbar input,.taskToolbar select{height:44px}
.summary div{
  border-radius:22px;
  background:var(--card);
  border-color:var(--line);
  box-shadow:0 16px 38px rgba(74,102,160,.08);
}
.summary div:nth-child(1){background:linear-gradient(135deg,color-mix(in srgb,#5b8cff 14%, var(--card)),var(--card))}
.summary div:nth-child(2){background:linear-gradient(135deg,color-mix(in srgb,#2fd08b 14%, var(--card)),var(--card))}
.summary div:nth-child(3){background:linear-gradient(135deg,color-mix(in srgb,#8b5cf6 14%, var(--card)),var(--card))}
.summary div:nth-child(4){background:linear-gradient(135deg,color-mix(in srgb,#f59e32 14%, var(--card)),var(--card))}
.summary div:nth-child(5){background:linear-gradient(135deg,color-mix(in srgb,#20b981 14%, var(--card)),var(--card))}
.summary span,.taskMetaGrid span,.taskFoot{color:var(--muted)}
.summary b,.taskMetaGrid b{color:var(--text)}
.task{
  border-radius:24px;
  background:var(--card);
  border-color:var(--line);
  box-shadow:0 16px 42px rgba(74,102,160,.09);
}
.task:hover{background:var(--panel-strong);border-color:var(--line2)}
.taskId,.pill,.skuChip{
  border-radius:999px;
}
.taskId{
  color:var(--brand);
  background:color-mix(in srgb,var(--brand) 9%, rgba(255,255,255,.62));
  border-color:color-mix(in srgb,var(--brand) 22%, var(--line));
}
.skuChip{
  background:rgba(255,255,255,.62);
  border-color:var(--line);
  color:var(--text);
}
[data-theme="dark"] .skuChip{background:rgba(10,17,30,.68)}
.taskDesc,.descBox,.comment,.event,.taskCardMeta{
  background:var(--card2);
  border-color:var(--line);
  border-radius:18px;
  color:var(--text);
}
.modal{
  background:rgba(25,33,52,.36);
  backdrop-filter:blur(10px);
}
[data-theme="dark"] .modal{background:rgba(0,0,0,.55)}
.modalCard,.card{
  border-radius:26px;
  background:var(--panel-strong);
  border-color:var(--line);
  box-shadow:var(--shadow);
}
.x{
  width:40px;
  height:40px;
  border-radius:999px;
  background:rgba(255,255,255,.62);
  color:var(--text);
}
[data-theme="dark"] .x{background:rgba(10,17,30,.7)}
.profilePreview{
  border-radius:24px;
  background:linear-gradient(180deg,var(--card),var(--card2));
  border-color:var(--line);
}
.avatar.big{border-radius:999px!important}
.profileForm input[readonly]{background:var(--card2);color:var(--muted)}
.memberPick{
  border-radius:22px;
  background:var(--card);
  border-color:var(--line);
}
.memberPick input{border-radius:999px}
.notificationPerm,.notificationSummary span,.notificationItem{
  border-radius:999px;
  background:var(--card);
  border-color:var(--line);
  color:var(--text);
}
.notificationItem{
  border-radius:22px;
}
.notificationItem.unread{background:linear-gradient(135deg,color-mix(in srgb,var(--brand) 14%, var(--card)),var(--card));border-color:color-mix(in srgb,var(--brand) 35%, var(--line))}
.fileBubble,.imageBubble{
  border-radius:18px;
  background:var(--card2);
  border-color:var(--line);
  color:var(--text);
}
.toast{
  border-radius:999px;
  background:var(--panel-strong);
  color:var(--text);
  border-color:var(--line2);
  box-shadow:var(--shadow);
}
.auth{
  background:
    radial-gradient(circle at 18% 14%, color-mix(in srgb,var(--brand3) 28%, transparent), transparent 34%),
    radial-gradient(circle at 84% 8%, color-mix(in srgb,var(--brand2) 24%, transparent), transparent 32%),
    linear-gradient(135deg,var(--bg),var(--bg2) 52%,var(--bg3));
}
.card .logo{margin-bottom:14px}
.tabs{
  border-radius:999px;
  background:rgba(255,255,255,.48);
  border-color:var(--line);
}
[data-theme="dark"] .tabs{background:rgba(10,17,30,.58)}
.tabs button{border-radius:999px;color:var(--muted)}
@media(max-width:1180px){
  .app{grid-template-columns:292px minmax(0,1fr)}
}
@media(max-width:860px){
  .app{height:auto;min-height:100dvh;padding:8px;grid-template-columns:1fr}
  .sidebar,.workspace{border-radius:24px}
  .workspace{min-height:58dvh}
  .brand{gap:10px}
  .chatDirectory{padding:12px}
  .taskActions{grid-template-columns:repeat(3,minmax(0,1fr))}
  .modalCard{border-radius:26px 26px 0 0}
}
@media(max-width:520px){
  .app{padding:0;gap:0}
  .sidebar,.workspace{border-radius:0;border-left:0;border-right:0}
  .sidebar{padding:14px}
  .brandLogo{width:48px;height:48px}
  .themeToggle,.notifBtn{width:42px;height:42px;min-width:42px}
  .profileBox{border-radius:24px}
  .nav,.taskScope{border-radius:26px}
  .quickActions{grid-template-columns:1fr}
  .summary{grid-template-columns:1fr}
  .taskActions{grid-template-columns:1fr}
  .chatDirName{flex-direction:row;align-items:center;flex-wrap:wrap}
}

/* Glass theme correction lock */
.headerBtn,.primary,.composer button{
  border:0!important;
  color:#fff!important;
  background:linear-gradient(135deg,var(--brand),var(--brand2))!important;
  box-shadow:0 14px 30px color-mix(in srgb,var(--brand) 28%, transparent)!important;
}
.taskToolbar input,.taskToolbar select,#userSearch,.modal input,.modal select,.modal textarea,.formgrid input,.formgrid select,.formgrid textarea{
  background:rgba(255,255,255,.74)!important;
  border-color:var(--line)!important;
  color:var(--text)!important;
}
[data-theme="dark"] .taskToolbar input,[data-theme="dark"] .taskToolbar select,[data-theme="dark"] #userSearch,[data-theme="dark"] .modal input,[data-theme="dark"] .modal select,[data-theme="dark"] .modal textarea,[data-theme="dark"] .formgrid input,[data-theme="dark"] .formgrid select,[data-theme="dark"] .formgrid textarea{
  background:rgba(9,16,29,.72)!important;
}
.emptySmall,.sideEmpty{
  background:var(--card2)!important;
  border-color:var(--line)!important;
  color:var(--muted)!important;
}
.emptySmall b{color:var(--text)!important}
.snew{background:color-mix(in srgb,#4f76ff 16%, rgba(255,255,255,.72))!important;color:#2d55d8!important}
.swork{background:color-mix(in srgb,#f59e32 18%, rgba(255,255,255,.72))!important;color:#a7640b!important}
.swait{background:color-mix(in srgb,#8b5cf6 16%, rgba(255,255,255,.72))!important;color:#6840d8!important}
.sdone{background:color-mix(in srgb,#20b981 16%, rgba(255,255,255,.72))!important;color:#12815d!important}
.purgent{background:color-mix(in srgb,#ef4d68 18%, rgba(255,255,255,.72))!important;color:#be2644!important}
.phigh{background:color-mix(in srgb,#f59e32 18%, rgba(255,255,255,.72))!important;color:#a7640b!important}
.pnormal{background:color-mix(in srgb,#4f76ff 16%, rgba(255,255,255,.72))!important;color:#2d55d8!important}
.plow{background:color-mix(in srgb,#20b981 16%, rgba(255,255,255,.72))!important;color:#12815d!important}
[data-theme="dark"] .snew,[data-theme="dark"] .pnormal{background:rgba(70,102,190,.34)!important;color:#dbe5ff!important}
[data-theme="dark"] .swork,[data-theme="dark"] .phigh{background:rgba(160,107,24,.34)!important;color:#ffe4b3!important}
[data-theme="dark"] .swait{background:rgba(123,92,206,.34)!important;color:#eadfff!important}
[data-theme="dark"] .sdone,[data-theme="dark"] .plow{background:rgba(27,135,94,.34)!important;color:#c9f8e4!important}
[data-theme="dark"] .purgent{background:rgba(171,44,67,.38)!important;color:#ffd6df!important}

/* Readability correction for notification badges and circular avatars */
.avatar,
.chatAvatar,
.miniAvatar,
.groupAvatar{
  color:#fff!important;
  font-weight:900;
  text-shadow:0 1px 7px rgba(0,0,0,.34);
}
.groupAvatar{
  background:linear-gradient(135deg,#36cfe0,#34c8a8)!important;
}
.badge{
  color:#fff!important;
  text-shadow:0 1px 4px rgba(120,0,28,.36);
}
.notifBtn .badge,
.nav .badge,
.chatUnread{
  min-width:22px!important;
  height:22px!important;
  padding:0 7px!important;
  border:1px solid rgba(255,255,255,.44)!important;
  background:linear-gradient(135deg,#ff516e,#ff7b58)!important;
  color:#fff!important;
  box-shadow:0 0 0 3px color-mix(in srgb,var(--panel-solid) 84%,transparent),0 10px 22px rgba(239,64,88,.32)!important;
}
[data-theme="dark"] .notifBtn .badge,
[data-theme="dark"] .nav .badge,
[data-theme="dark"] .chatUnread{
  border-color:rgba(255,255,255,.28)!important;
  box-shadow:0 0 0 3px rgba(8,15,28,.95),0 10px 24px rgba(255,71,104,.38)!important;
}
.chatUnread{
  position:static!important;
  flex:0 0 auto;
}

/* Sidebar identity card correction */
.compactBrand{
  margin:0!important;
  padding:0 4px 4px!important;
}
.compactBrand .brandLogo{
  width:42px!important;
  height:42px!important;
  flex:0 0 42px;
}
.compactBrand b{
  font-size:18px!important;
  letter-spacing:0;
}
.profileBox{
  display:block!important;
  padding:14px!important;
  border-radius:24px!important;
  overflow:hidden;
}
.profileTop{
  display:flex;
  align-items:center;
  gap:14px;
  min-width:0;
}
.profileAvatar{
  width:66px!important;
  height:66px!important;
  flex:0 0 66px;
  border-radius:999px!important;
  overflow:hidden;
  font-size:20px;
  box-shadow:0 0 0 4px color-mix(in srgb,var(--brand) 10%, transparent),0 16px 34px rgba(69,88,190,.22)!important;
}
.profileAvatar img{
  width:100%;
  height:100%;
  object-fit:cover;
  border-radius:999px!important;
}
.profileText{
  min-width:0;
  display:grid;
  gap:2px;
}
.profileText b{
  font-size:17px!important;
  line-height:1.12;
}
.profileText span{
  font-size:13px!important;
  line-height:1.22!important;
}
.profileId{
  width:max-content;
  max-width:100%;
  display:inline-flex!important;
  align-items:center;
  min-height:22px;
  padding:3px 9px;
  border:1px solid color-mix(in srgb,var(--brand) 28%, var(--line));
  border-radius:999px;
  background:color-mix(in srgb,var(--brand) 9%, rgba(255,255,255,.54));
  color:color-mix(in srgb,var(--brand) 68%, var(--text))!important;
  font-weight:850;
}
[data-theme="dark"] .profileId{
  background:rgba(55,73,120,.46);
  color:#dbe6ff!important;
}
.profileTools{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:8px;
  margin-top:13px;
}
.profileTools button,
.profileGlow{
  width:100%!important;
  min-width:0!important;
  height:40px!important;
  padding:0!important;
  border-radius:999px!important;
  display:grid!important;
  place-items:center!important;
  background:rgba(255,255,255,.62);
  border-color:var(--line);
  color:var(--text);
  box-shadow:none;
}
[data-theme="dark"] .profileTools button,
[data-theme="dark"] .profileGlow{
  background:rgba(10,17,30,.68);
}
.profileGlow{
  font-size:15px;
  font-weight:900;
}
.profileBtns{
  grid-template-columns:1fr 1fr!important;
  gap:8px!important;
  margin-top:10px;
}
.profileBtn,
.logoutBtn{
  min-height:38px!important;
  font-size:14px!important;
  font-weight:750;
}
.profilePulse .profileAvatar{
  animation:avatarAura 1.05s ease both;
}
.profilePulse{
  animation:cardAura 1.05s ease both;
}
@keyframes avatarAura{
  0%{box-shadow:0 0 0 4px color-mix(in srgb,var(--brand) 10%, transparent),0 16px 34px rgba(69,88,190,.22)}
  45%{box-shadow:0 0 0 7px rgba(48,214,224,.22),0 0 36px rgba(48,214,224,.42),0 18px 42px rgba(107,92,255,.26)}
  100%{box-shadow:0 0 0 4px color-mix(in srgb,var(--brand) 10%, transparent),0 16px 34px rgba(69,88,190,.22)}
}
@keyframes cardAura{
  0%,100%{border-color:var(--line)}
  45%{border-color:rgba(48,214,224,.62)}
}
@media(max-width:1100px){
  .profileTop{align-items:flex-start}
  .profileAvatar{width:58px!important;height:58px!important;flex-basis:58px}
}
@media(max-width:520px){
  .compactBrand{padding-bottom:8px!important}
  .profileBox{padding:13px!important}
  .profileTop{gap:12px}
  .profileAvatar{width:56px!important;height:56px!important;flex-basis:56px}
}

/* Identity card direction correction */
.sidebar{
  padding-top:18px!important;
}
.compactBrand,
.profileId,
.profileTools,
#meRole{
  display:none!important;
}
.profileBox{
  position:relative;
  display:block!important;
  padding:18px!important;
  border-radius:28px!important;
  background:
    radial-gradient(circle at 20% 10%, color-mix(in srgb,var(--brand3) 13%, transparent), transparent 42%),
    linear-gradient(160deg,var(--card),var(--card2))!important;
  box-shadow:0 18px 48px rgba(58,78,132,.13)!important;
}
.profileTop{
  display:grid!important;
  grid-template-columns:82px minmax(0,1fr);
  align-items:center;
  gap:16px;
}
.profileAvatar{
  width:82px!important;
  height:82px!important;
  flex:0 0 82px!important;
  border-radius:999px!important;
  overflow:hidden;
  font-size:26px!important;
  box-shadow:0 0 0 5px color-mix(in srgb,var(--brand) 12%, transparent),0 18px 42px rgba(74,94,210,.26)!important;
}
.profileAvatar img{
  border-radius:999px!important;
  object-fit:cover!important;
}
.profileText{
  min-width:0;
}
.profileText b{
  font-size:19px!important;
  line-height:1.12!important;
  white-space:normal!important;
}
.profileText span{
  display:block;
  font-size:14px!important;
  line-height:1.35!important;
}
.profileText #mePosition{
  color:color-mix(in srgb,var(--brand) 66%, var(--text))!important;
  font-weight:760;
}
.profileText #meEmail{
  max-width:100%;
  opacity:.86;
}
.profileBtns{
  display:grid!important;
  grid-template-columns:1fr 1fr!important;
  gap:10px!important;
  margin-top:18px!important;
}
.profileBtn,
.settingsBtn{
  position:relative!important;
  min-height:40px!important;
  padding:0 14px!important;
  border-radius:999px!important;
  font-size:14px!important;
  font-weight:820!important;
  background:rgba(255,255,255,.58)!important;
  border-color:var(--line)!important;
  color:var(--text)!important;
}
[data-theme="dark"] .profileBtn,
[data-theme="dark"] .settingsBtn{
  background:rgba(10,17,30,.68)!important;
}
.settingsBtn .badge{
  position:absolute!important;
  right:-4px!important;
  top:-8px!important;
}
.settingsModal{
  display:grid;
  gap:10px;
}
.settingsRow{
  width:100%;
  min-height:74px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  text-align:left;
  border-radius:22px;
  padding:14px 16px;
  background:var(--card);
  border-color:var(--line);
  color:var(--text);
}
.settingsRow span{
  min-width:0;
  display:grid;
  gap:4px;
}
.settingsRow b,
.settingsRow small{
  display:block;
}
.settingsRow small{
  color:var(--muted);
}
.settingsRow strong,
.settingsRow i{
  width:42px;
  height:42px;
  flex:0 0 42px;
  display:grid;
  place-items:center;
  border-radius:999px;
  font-style:normal;
  background:color-mix(in srgb,var(--brand) 10%, rgba(255,255,255,.58));
}
.settingsRow.danger strong{
  background:rgba(239,64,88,.12);
  color:#ef4058;
}
.profileModalWide{
  grid-template-columns:minmax(310px,420px) minmax(0,1fr)!important;
  align-items:stretch;
}
.profileHero{
  display:flex;
  flex-direction:column;
  min-width:0;
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:28px;
  background:
    radial-gradient(circle at 26% 14%, color-mix(in srgb,var(--brand3) 17%, transparent), transparent 42%),
    linear-gradient(160deg,var(--card),var(--card2));
  box-shadow:0 18px 48px rgba(58,78,132,.12);
}
.profileHeroMain{
  display:grid;
  grid-template-columns:128px minmax(0,1fr);
  gap:22px;
  align-items:center;
  padding:28px;
}
.profileHero .avatar.big{
  width:128px!important;
  height:128px!important;
  border-radius:999px!important;
  font-size:38px;
  box-shadow:0 0 0 7px color-mix(in srgb,var(--brand) 10%, transparent),0 24px 54px rgba(74,94,210,.28);
}
.profileHeroText h3{
  margin:0;
  font-size:30px;
  line-height:1.05;
  color:var(--text);
  overflow-wrap:anywhere;
}
.profileHeroText p{
  margin:9px 0 16px;
  font-size:20px;
  color:color-mix(in srgb,var(--brand) 66%, var(--text));
  font-weight:760;
}
.shiftBadge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  min-height:38px;
  padding:0 16px;
  border-radius:999px;
  color:#62d64d;
  background:rgba(72,190,67,.14);
  border:1px solid rgba(72,190,67,.25);
  font-weight:850;
}
.shiftBadge::before{
  content:"";
  width:9px;
  height:9px;
  border-radius:999px;
  background:#62d64d;
  box-shadow:0 0 0 4px rgba(98,214,77,.14);
}
.profileHeroAbout{
  margin:0 28px 24px;
  padding-top:22px;
  border-top:1px solid var(--line);
  color:var(--muted);
  line-height:1.45;
  min-height:72px;
}
.profileContactGrid{
  margin-top:auto;
  display:grid;
  grid-template-columns:1fr 1fr;
  border-top:1px solid var(--line);
  background:color-mix(in srgb,var(--card2) 70%, transparent);
}
.profileContactGrid div{
  min-width:0;
  padding:22px 24px;
}
.profileContactGrid div+div{
  border-left:1px solid var(--line);
}
.profileContactGrid span,
.profileContactGrid b{
  display:block;
  min-width:0;
}
.profileContactGrid span{
  color:var(--muted);
  margin-bottom:8px;
}
.profileContactGrid b{
  color:var(--text);
  overflow-wrap:anywhere;
}
@media(max-width:920px){
  .profileModalWide{
    grid-template-columns:1fr!important;
  }
  .profileHeroMain{
    grid-template-columns:96px minmax(0,1fr);
    padding:22px;
  }
  .profileHero .avatar.big{
    width:96px!important;
    height:96px!important;
  }
}
@media(max-width:520px){
  .profileTop{
    grid-template-columns:68px minmax(0,1fr);
    gap:13px;
  }
  .profileAvatar{
    width:68px!important;
    height:68px!important;
    flex-basis:68px!important;
  }
  .profileHeroMain,
  .profileContactGrid{
    grid-template-columns:1fr;
  }
  .profileHeroMain{
    text-align:left;
  }
  .profileContactGrid div+div{
    border-left:0;
    border-top:1px solid var(--line);
  }
}

/* Profile view/settings split */
.dutyStatus{
  width:max-content;
  max-width:100%;
  display:inline-flex!important;
  align-items:center;
  gap:7px;
  min-height:24px;
  padding:4px 10px;
  border-radius:999px;
  font-size:12px!important;
  font-weight:850;
  white-space:nowrap!important;
}
.dutyStatus::before{
  content:"";
  width:7px;
  height:7px;
  border-radius:999px;
}
.dutyOn{
  color:#37b24d!important;
  background:rgba(55,178,77,.13);
  border:1px solid rgba(55,178,77,.24);
}
.dutyOn::before{
  background:#37b24d;
  box-shadow:0 0 0 4px rgba(55,178,77,.12);
}
.dutyOff{
  color:var(--muted)!important;
  background:rgba(128,145,170,.12);
  border:1px solid var(--line);
}
.dutyOff::before{
  background:var(--muted);
}
.profileViewOnly{
  display:block!important;
}
.modalCard:has(.profileViewOnly){
  width:min(1040px,94vw);
}
.profileViewOnly .profileHero{
  width:100%;
  display:grid!important;
  grid-template-columns:132px minmax(260px,1fr) minmax(300px,.9fr);
  grid-template-areas:
    "avatar info contacts"
    "about about contacts"
    "action action contacts";
  align-items:center;
  gap:22px 26px;
  padding:28px!important;
}
.profileViewOnly .profileHero>.avatar.big{
  grid-area:avatar;
}
.profileViewOnly .profileHeroText{
  grid-area:info;
  min-width:0;
}
.profileViewOnly .profileHeroAbout{
  grid-area:about;
  min-height:auto;
  margin:0!important;
  padding:18px 0 0!important;
}
.profileViewOnly .profileContactGrid{
  grid-area:contacts;
  align-self:stretch;
  margin:0!important;
  display:grid!important;
  grid-template-columns:1fr!important;
  border:1px solid var(--line)!important;
  border-radius:24px;
  overflow:hidden;
  background:color-mix(in srgb,var(--card2) 72%, transparent);
}
.profileViewOnly .profileContactGrid div{
  padding:22px!important;
}
.profileViewOnly .profileContactGrid div+div{
  border-left:0!important;
  border-top:1px solid var(--line)!important;
}
.profileViewOnly .profileSettingsOpen{
  grid-area:action;
  width:max-content;
  min-width:220px;
  justify-self:start;
}
.profileViewOnly .shiftBadge.dutyOff{
  color:var(--muted);
  background:rgba(128,145,170,.12);
  border-color:var(--line);
}
.settingsSection{
  display:grid;
  gap:12px;
  padding:14px;
  border:1px solid var(--line);
  border-radius:24px;
  background:var(--card2);
}
.settingsSection h3{
  margin:0;
  font-size:14px;
  color:var(--muted);
  text-transform:uppercase;
  letter-spacing:.08em;
}
.fileControl{
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  gap:10px;
  align-items:center;
}
.fileControl button{
  min-height:42px;
  border-radius:999px;
  padding:0 16px;
  background:rgba(255,255,255,.62);
  border-color:var(--line);
  color:var(--text);
  font-weight:780;
}
[data-theme="dark"] .fileControl button{
  background:rgba(10,17,30,.68);
}
.fileControl span{
  min-width:0;
  color:var(--muted);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.settingsUnread{
  color:#fff!important;
  background:linear-gradient(135deg,#ff516e,#ff7b58)!important;
}
@media(max-width:900px){
  .profileViewOnly .profileHero{
    grid-template-columns:104px minmax(0,1fr);
    grid-template-areas:
      "avatar info"
      "about about"
      "contacts contacts"
      "action action";
  }
  .profileViewOnly .profileHero>.avatar.big{
    width:104px!important;
    height:104px!important;
  }
}
@media(max-width:520px){
  .fileControl{
    grid-template-columns:1fr;
  }
  .profileViewOnly .profileHero{
    grid-template-columns:1fr;
    grid-template-areas:
      "avatar"
      "info"
      "about"
      "contacts"
      "action";
  }
  .profileViewOnly .profileSettingsOpen{
    width:100%;
  }
}

/* Profile modal compact ID-card correction */
.modalCard:has(.profileViewOnly){
  width:min(800px,94vw)!important;
}
.profileSettingsIcon{
  position:absolute;
  right:62px;
  top:14px;
  width:40px;
  height:40px;
  padding:0;
  border-radius:999px!important;
  display:grid;
  place-items:center;
  background:rgba(255,255,255,.62);
  border-color:var(--line);
  color:var(--text);
  z-index:2;
}
[data-theme="dark"] .profileSettingsIcon{
  background:rgba(10,17,30,.7);
}
.profileViewOnly .profileHero{
  width:100%;
  display:block!important;
  padding:0!important;
  overflow:hidden;
  border-radius:28px;
}
.profileViewOnly .profileHeroMain{
  display:grid!important;
  grid-template-columns:148px minmax(0,1fr);
  gap:28px;
  align-items:center;
  padding:28px 34px 24px!important;
}
.profileViewOnly .profileHeroMain>.avatar.big,
.profileViewOnly .profileHeroMain>.profileHeroText{
  grid-area:auto!important;
  justify-self:start!important;
}
.profileViewOnly .profileHero>.avatar.big,
.profileViewOnly .profileHeroMain>.avatar.big{
  width:148px!important;
  height:148px!important;
  border-radius:999px!important;
}
.profileViewOnly .profileHeroText h3{
  font-size:34px;
}
.profileViewOnly .profileHeroText p{
  font-size:22px;
  margin:8px 0 16px;
}
.profileViewOnly .profileHeroAbout{
  margin:0 34px!important;
  padding:22px 0!important;
  border-top:1px solid var(--line);
  min-height:92px;
}
.profileViewOnly .profileContactGrid{
  margin:0!important;
  display:grid!important;
  grid-template-columns:1fr 1fr!important;
  border:0!important;
  border-top:1px solid var(--line)!important;
  border-radius:0!important;
  background:color-mix(in srgb,var(--card2) 72%, transparent);
}
.profileViewOnly .profileContactGrid div{
  padding:22px 34px!important;
}
.profileViewOnly .profileContactGrid div+div{
  border-top:0!important;
  border-left:1px solid var(--line)!important;
}
.profileViewOnly .profileSettingsOpen{
  display:none!important;
}
@media(max-width:760px){
  .modalCard:has(.profileViewOnly){
    width:min(620px,94vw)!important;
  }
  .profileViewOnly .profileHeroMain{
    grid-template-columns:108px minmax(0,1fr);
    gap:18px;
    padding:24px!important;
  }
  .profileViewOnly .profileHeroMain>.avatar.big{
    width:108px!important;
    height:108px!important;
  }
  .profileViewOnly .profileHeroText h3{
    font-size:26px;
  }
  .profileViewOnly .profileHeroText p{
    font-size:18px;
  }
  .profileViewOnly .profileHeroAbout{
    margin:0 24px!important;
  }
  .profileViewOnly .profileContactGrid{
    grid-template-columns:1fr!important;
  }
  .profileViewOnly .profileContactGrid div+div{
    border-left:0!important;
    border-top:1px solid var(--line)!important;
  }
}
@media(max-width:520px){
  .profileSettingsIcon{
    right:60px;
  }
  .profileViewOnly .profileHeroMain{
    grid-template-columns:1fr;
    text-align:left;
  }
}

/* UI alignment and icon polish */
body,
button,
input,
select,
textarea{
  font-family:Manrope,Inter,"Segoe UI",Arial,sans-serif;
}
.uiIcon{
  width:18px;
  height:18px;
  display:block;
  flex:0 0 18px;
  fill:none;
  stroke:currentColor;
  stroke-width:2;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.nav button{
  display:flex!important;
  align-items:center;
  justify-content:center;
  gap:7px;
}
.nav button .uiIcon{
  width:17px;
  height:17px;
  flex-basis:17px;
}
.x,
.profileSettingsIcon,
.attachBtn{
  display:grid!important;
  place-items:center!important;
}
.x .uiIcon,
.profileSettingsIcon .uiIcon,
.attachBtn .uiIcon{
  width:19px;
  height:19px;
}
.profileBox{
  padding:16px!important;
  border-radius:26px!important;
}
.profileTop{
  grid-template-columns:78px minmax(0,1fr)!important;
  align-items:center!important;
  gap:14px!important;
}
.profileAvatar{
  width:78px!important;
  height:78px!important;
  flex-basis:78px!important;
}
.profileText{
  display:grid;
  align-content:center;
  justify-items:start;
  gap:4px;
  min-width:0;
}
.profileText b,
.profileText #mePosition,
.profileText #meDuty{
  max-width:100%;
  margin:0!important;
}
.profileText b{
  font-size:18px!important;
  line-height:1.12!important;
}
.profileText #mePosition{
  font-size:14px!important;
  line-height:1.2!important;
}
.profileText #meDuty.dutyStatus{
  min-height:18px!important;
  padding:1px 7px!important;
  gap:5px!important;
  font-size:10px!important;
  font-weight:800!important;
  line-height:1!important;
}
.profileText #meDuty.dutyStatus::before{
  width:5px!important;
  height:5px!important;
  flex:0 0 5px;
  box-shadow:0 0 0 3px rgba(55,178,77,.1)!important;
}
@media(min-width:761px){
  .profileText #meDuty.dutyStatus{
    margin-top:3px!important;
  }
}
.profileBtns{
  margin-top:16px!important;
}
.profileBtn,
.settingsBtn{
  min-height:38px!important;
}
.settingsRow strong,
.settingsRow i{
  color:var(--text);
}
.settingsRow strong .uiIcon,
.settingsRow i .uiIcon{
  width:20px;
  height:20px;
}
.settingsRow.danger strong .uiIcon{
  stroke:#ef4058;
}
.profileSettingsIcon{
  font-size:0;
}
.profileViewOnly .profileHeroMain{
  grid-template-columns:148px minmax(0,1fr)!important;
  align-items:center!important;
  gap:28px!important;
}
.profileViewOnly .profileHeroText{
  display:grid;
  align-content:center;
  justify-items:start;
  gap:8px;
  min-width:0;
}
.profileViewOnly .profileHeroText h3,
.profileViewOnly .profileHeroText p{
  margin:0!important;
}
.profileViewOnly .profileHeroText h3{
  line-height:1.08!important;
}
.profileViewOnly .profileHeroText p{
  line-height:1.18!important;
}
.shiftBadge{
  min-height:32px!important;
  padding:0 13px!important;
  gap:8px!important;
  font-size:14px!important;
  line-height:1!important;
}
.shiftBadge::before{
  width:8px!important;
  height:8px!important;
  flex:0 0 8px;
}
.profileViewOnly .profileHeroAbout{
  line-height:1.55!important;
}
@media(max-width:760px){
  .profileViewOnly .profileHeroMain{
    grid-template-columns:108px minmax(0,1fr)!important;
    gap:18px!important;
  }
}
@media(max-width:520px){
  .profileBox{
    padding:14px!important;
  }
  .profileTop{
    grid-template-columns:62px minmax(0,1fr)!important;
    gap:12px!important;
  }
  .profileAvatar{
    width:62px!important;
    height:62px!important;
    flex-basis:62px!important;
  }
  .profileViewOnly .profileHeroMain{
    grid-template-columns:1fr!important;
  }
}

/* Functional navigation pass */
.legacySideData{
  display:none!important;
}
.appNav.nav{
  position:static!important;
  display:grid!important;
  grid-template-columns:1fr!important;
  gap:8px!important;
  margin:14px 0 12px!important;
  padding:8px!important;
  border:1px solid var(--line);
  border-radius:24px;
  background:color-mix(in srgb,var(--card2) 74%, transparent)!important;
}
.appNav.nav button{
  min-height:46px;
  justify-content:flex-start!important;
  padding:0 14px!important;
  border-radius:16px!important;
  color:var(--muted);
  background:transparent!important;
  border-color:transparent!important;
  font-weight:800;
}
.appNav.nav button:hover{
  background:color-mix(in srgb,var(--brand) 9%, transparent)!important;
}
.appNav.nav button.active{
  color:var(--brand);
  background:color-mix(in srgb,var(--brand) 13%, var(--card))!important;
  border-color:color-mix(in srgb,var(--brand) 28%, var(--line))!important;
}
.appNav .badge{
  margin-left:auto;
}
.adminSideBlock{
  margin-top:12px!important;
}
.adminSideBlock .sectionTitle h4{
  margin-top:0;
}
.adminOpen{
  width:100%;
}
.headerActions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.secondaryHeader{
  background:var(--card)!important;
  color:var(--text)!important;
  border-color:var(--line)!important;
}
.workSurface{
  padding:22px;
  overflow:auto;
  min-height:0;
}
.sectionToolbar{
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom:14px;
}
.sectionToolbar input{
  flex:1;
  min-width:0;
}
.segmented{
  display:flex;
  gap:6px;
  padding:5px;
  border:1px solid var(--line);
  border-radius:999px;
  background:color-mix(in srgb,var(--card2) 70%, transparent);
}
.segmented button{
  min-height:34px;
  padding:0 13px;
  border-radius:999px;
  border-color:transparent;
  background:transparent;
  color:var(--muted);
  font-weight:800;
}
.segmented button.active{
  background:color-mix(in srgb,var(--brand) 14%, var(--card));
  border-color:color-mix(in srgb,var(--brand) 30%, var(--line));
  color:var(--brand);
}
.simpleChatHome .header{
  flex-direction:row;
  align-items:center;
}
.singleChatList{
  display:grid;
  gap:10px;
  max-width:860px;
}
.singleChatList .chatDirectoryRow{
  min-height:74px;
}
.inboxHome,
.peopleHome,
.simpleChatHome{
  height:100%;
  display:grid;
  grid-template-rows:auto minmax(0,1fr);
  overflow:hidden;
  background:linear-gradient(145deg,var(--panel),rgba(255,255,255,.2));
}
.inboxGrid{
  min-height:0;
  overflow:auto;
  padding:22px;
  display:grid;
  grid-template-columns:minmax(0,1.35fr) minmax(300px,.85fr);
  grid-template-areas:
    "attention tasks"
    "attention duty";
  gap:16px;
}
.inboxPanel{
  min-width:0;
  border:1px solid var(--line);
  border-radius:24px;
  padding:16px;
  background:linear-gradient(160deg,var(--card),var(--card2));
  box-shadow:0 18px 48px rgba(58,78,132,.08);
}
.mainInboxPanel{
  grid-area:attention;
}
.inboxPanel:nth-child(2){
  grid-area:tasks;
}
.inboxPanel:nth-child(3){
  grid-area:duty;
}
.inboxList,
.compactTaskList,
.peopleMiniList{
  display:grid;
  gap:10px;
}
.inboxItem,
.compactTask,
.peopleMini,
.employeeCard{
  width:100%;
  min-width:0;
  text-align:left;
  border:1px solid var(--line);
  background:color-mix(in srgb,var(--card2) 75%, transparent);
  color:var(--text);
}
.inboxItem{
  display:grid;
  gap:4px;
  padding:13px 14px;
  border-radius:18px;
}
.inboxItem span{
  width:max-content;
  max-width:100%;
  color:var(--brand);
  font-size:12px;
  font-weight:900;
}
.inboxItem b,
.inboxItem small,
.compactTask b,
.compactTask small{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.inboxItem small,
.compactTask small{
  color:var(--muted);
}
.compactTask{
  padding:12px 13px;
  border-radius:16px;
}
.moreBtn{
  width:100%;
  margin-top:10px;
}
.peopleMini{
  display:flex;
  align-items:center;
  gap:11px;
  padding:10px;
  border-radius:16px;
}
.peopleMini span,
.peopleMini b,
.peopleMini small{
  min-width:0;
  display:block;
}
.peopleMini small{
  color:var(--muted);
}
.employeeGrid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(280px,1fr));
  gap:12px;
}
.employeeCard{
  display:grid;
  grid-template-columns:52px minmax(0,1fr) auto;
  align-items:center;
  gap:12px;
  padding:14px;
  border-radius:20px;
}
.employeeAvatar{
  width:52px;
  height:52px;
  border-radius:16px;
  display:grid;
  place-items:center;
  overflow:hidden;
  background:linear-gradient(135deg,var(--brand),var(--brand2));
  color:#fff;
  font-weight:900;
}
.employeeCard span,
.employeeCard b,
.employeeCard small{
  min-width:0;
  display:block;
}
.employeeCard b{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.employeeCard small{
  color:var(--muted);
  margin:2px 0 7px;
}
.employeeCard strong{
  color:var(--brand);
  font-size:13px;
}
@media(max-width:980px){
  .inboxGrid{
    grid-template-columns:1fr;
    grid-template-areas:"attention" "tasks" "duty";
  }
  .sectionToolbar{
    flex-direction:column;
    align-items:stretch;
  }
  .segmented{
    width:100%;
  }
  .segmented button{
    flex:1;
  }
}
@media(max-width:520px){
  .appNav.nav{
    grid-template-columns:1fr 1fr!important;
  }
  .appNav.nav button{
    justify-content:center!important;
    padding:0 8px!important;
  }
  .appNav.nav button span:not(.badge){
    font-size:13px;
  }
  .workSurface,
  .inboxGrid{
    padding:14px;
  }
  .simpleChatHome .header,
  .inboxHeader{
    align-items:stretch!important;
    flex-direction:column!important;
  }
  .headerActions,
  .headerActions button,
  .simpleChatHome .header .headerBtn{
    width:100%;
  }
  .employeeGrid{
    grid-template-columns:1fr;
  }
  .employeeCard{
    grid-template-columns:48px minmax(0,1fr);
  }
  .employeeCard strong{
    grid-column:1 / -1;
  }
}
