:root{--nav:#17384d;--accent:#ea6571;--ink:#263440;--muted:#82919e;--line:#e8edf0;--bg:#f7f8f9;--card:#fff}
*{box-sizing:border-box}
body{margin:0;background:var(--bg);font-family:Inter,Arial,sans-serif;color:var(--ink)}
button,input,textarea,select{font:inherit}
button{cursor:pointer;border:0;background:none;color:inherit}
.mobile-menu,.mobile-sidebar-head{display:none}
.shell{height:100vh;height:100dvh;display:grid;grid-template-columns:64px 350px minmax(0,1fr)}
.rail{background:var(--nav);padding-top:18px;display:flex;align-items:center;flex-direction:column;gap:13px}
.avatar,.round{width:40px;height:40px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(135deg,#ff9475,#e7587b);color:#fff;font-weight:700}
.mini{width:38px;height:38px;border-radius:50%;background:#294c63;color:#d5e0e6}
.sidebar{background:#fff;border-right:1px solid var(--line);overflow:auto}
.search{padding:16px;border-bottom:1px solid var(--line)}
.search input{width:100%;border:0;outline:0;background:#f3f5f7;border-radius:9px;padding:11px 13px}
.section-title{padding:19px 16px 8px;font-weight:700;font-size:14px;display:flex;justify-content:space-between;align-items:center}
.badge{color:#357ec0;background:#e9f3fd;border-radius:99px;padding:2px 8px;font-size:12px}
.item{width:100%;display:grid;grid-template-columns:42px minmax(0,1fr) auto;gap:10px;padding:11px 14px;text-align:left;align-items:center}
.item-copy{min-width:0}
.item:hover,.item.active{background:#eaf5ff}
.round{width:40px;height:40px;font-size:13px}
.image-avatar{overflow:hidden}
.image-avatar img{width:100%;height:100%;object-fit:cover}
.item h4{margin:0;font-size:14px;line-height:1.25;white-space:normal;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.item p{margin:4px 0 0;color:var(--muted);font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.item-meta{min-width:28px;display:grid;justify-items:end;align-content:center;gap:5px;color:var(--muted);font-size:11px;white-space:nowrap}
.item-meta time{font:inherit}
.item .unread{background:#3187d4;color:#fff;border-radius:50%;min-width:19px;height:19px;display:grid;place-items:center;font-size:11px}
.folder{padding:9px 14px;color:#667784;font-size:13px;background:#f7fafc;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.sidebar-create{padding:8px 14px}
.sidebar-create button{font-weight:700;color:#367fb8}
.workspace-toggle{width:100%;padding:15px 16px 11px;text-align:left;display:grid;gap:3px;border-bottom:1px solid var(--line)}
.workspace-toggle span{font-size:16px;font-weight:700}.workspace-toggle small{color:var(--muted);font-size:12px}
.team-caption{padding:13px 16px 7px;font-size:13px;font-weight:700;color:var(--muted)}
.employee-item{display:flex;align-items:center;gap:10px;padding:8px 14px}.employee-item .round{flex:0 0 38px;width:38px;height:38px}.employee-item span{min-width:0;display:grid;gap:2px}.employee-item b{font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.employee-item small{font-size:11px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.section-toggle{width:100%;padding:14px 16px 7px;display:grid;grid-template-columns:1fr auto auto;gap:8px;align-items:center;text-align:left;font-weight:700;font-size:14px}
.main{display:grid;grid-template-rows:76px 1fr 70px;min-width:0}
.header{background:#fff;border-bottom:1px solid var(--line);padding:13px 28px;display:flex;align-items:center;gap:12px;min-width:0}
.header>div{min-width:0}
.header h1{font-size:17px;line-height:1.25;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.header p{margin:3px 0 0;color:var(--muted);font-size:13px}
.deadline{margin-left:auto;flex:0 0 auto;border:1px solid #f4c3c2;background:#fff6f5;color:#bf3436;border-radius:9px;padding:9px 13px;font-weight:700;white-space:nowrap}
.channel-actions{font-size:24px;line-height:1;color:var(--muted);padding:5px 8px}
.messages{padding:24px max(28px,10%);overflow:auto;background:linear-gradient(120deg,#fafcfd,#f4f7f8)}
.message{max-width:630px;background:#fff;border:1px solid #edf0f2;border-radius:12px;padding:10px 13px;margin:11px 0;box-shadow:0 1px 2px #00000008}
.message.me{margin-left:auto;background:#e8f5ff}
.message b{font-size:13px}
.message p{margin:5px 0;font-size:14px;line-height:1.4;overflow-wrap:anywhere}
.message time{font-size:11px;color:var(--muted);float:right}
.compose{background:#fff;border-top:1px solid var(--line);padding:12px 24px;display:flex;gap:10px}
.compose textarea{resize:none;height:44px;flex:1;min-width:0;border:1px solid var(--line);border-radius:10px;padding:10px}
.send,.primary{background:#2f83c6;color:#fff;border-radius:9px;padding:0 17px;font-weight:700}
.empty{display:grid;place-items:center;color:var(--muted);font-size:18px}
.modal-back{position:fixed;inset:0;background:#10202f88;display:grid;place-items:center;padding:20px}
.modal{background:#fff;color:var(--ink);border-radius:16px;width:min(860px,100%);max-height:90vh;overflow:auto;padding:24px;box-shadow:0 20px 60px #0005}
.modal-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;border-bottom:1px solid var(--line);padding-bottom:15px}
.modal-head>div:first-child{min-width:0}
.modal h2{margin:0;font-size:22px;overflow-wrap:anywhere}
.modal h3{margin:18px 0 8px;font-size:15px}
.close{font-size:24px;color:#75828b}
.meta{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:18px 0}
.meta div{background:#f5f8fa;border-radius:10px;padding:10px;overflow-wrap:anywhere}
.meta small{color:var(--muted);display:block;margin-bottom:4px}
.stage{display:grid;grid-template-columns:1.4fr 1fr 1fr .8fr;gap:10px;padding:11px;border-bottom:1px solid var(--line);align-items:center;font-size:13px;overflow-wrap:anywhere}
.stage-heading{font-weight:700;color:#77848d}
.status{color:#297e51;background:#edf8f0;border-radius:99px;padding:4px 7px;text-align:center;font-size:11px}
.rule{margin-top:18px;background:#f3f8fc;border-radius:10px;padding:13px;line-height:1.5}
.eyebrow{margin:0 0 4px;font-size:12px;text-transform:uppercase;letter-spacing:.06em;color:var(--muted)}
.project-plan{background:#202020;color:#eee;border:1px solid #303030;box-shadow:none;overscroll-behavior:contain}
.project-plan .modal-head{border-color:#383838;background:#202020}.project-plan .modal-head p{color:#aaa}.project-plan .eyebrow{color:#aaa}
.project-plan .meta div,.project-plan .rule{background:#292929;color:#eee}.project-plan .meta small{color:#aaa}.project-plan .stage{border-color:#383838}.project-plan .stage-heading{color:#aaa}.project-plan .stage:not(.stage-heading) div:nth-child(2){color:#a8b7c4}.project-plan .secondary{border-color:#6f8da2;color:#8fc4ef}.project-plan .close{color:#eee;background:#303030;border-radius:50%;width:36px;height:36px}.project-plan .status{color:#74d69d;background:#173d2b}.plan-actions{display:flex;align-items:center;gap:8px}.plan-actions .secondary{margin:0}
.project-form{display:grid;gap:10px;margin-top:16px}
.secondary{border:1px solid #b8ccd9;border-radius:8px;padding:7px 10px;color:#2b6c96;font-weight:700;margin-right:8px}
.edit-project{display:grid;grid-template-columns:2fr 1fr 1fr;gap:10px}
.edit-project label,.project-form label{display:grid;gap:5px;font-size:13px;color:#60717c;min-width:0}
.edit-project input,.edit-project select,.edit-stage input,.edit-stage select{width:100%;min-width:0;border:1px solid var(--line);padding:9px;border-radius:8px;background:#fff}
.edit-stage{display:grid;grid-template-columns:1.2fr 1fr 1fr .8fr 26px;gap:7px;margin:7px 0}
.edit-head{color:#78858d;font-size:12px}
.edit-head span{padding:4px}
.remove-stage{font-size:20px;color:#a35b5b}
.add-stage{width:max-content;margin:8px 0}
.hint{font-size:13px;color:#657680;margin:4px 0 13px}
.save-project{height:42px;width:max-content}
.compact-form{width:min(480px,100%);display:grid;gap:13px}
.compact-form label{display:grid;gap:6px;font-size:13px;color:var(--muted)}
.compact-form input{border:1px solid var(--line);border-radius:8px;padding:10px;background:#fff;color:var(--ink)}
.form-button{height:42px;width:max-content}
.members{display:grid;gap:10px;margin:12px 0}
.members>div{display:flex;align-items:center;gap:10px;min-width:0}
.members span{display:grid;gap:3px;min-width:0}
.members small{color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.member-avatar{width:38px;height:38px;border-radius:50%;display:grid;place-items:center;flex:0 0 38px;background:#4968d9;color:#fff;font-weight:700;overflow:hidden}
.member-avatar img{width:100%;height:100%;object-fit:cover}
.leave-group{margin-top:16px;color:#d95757;font-weight:700}
@media(max-width:760px){.shell{grid-template-columns:0 minmax(0,1fr)}
.rail{display:none}
.sidebar{position:fixed;left:0;top:0;bottom:0;width:min(350px,86%);z-index:3;transform:translateX(-100%)}
.sidebar.open{transform:none}
.main{grid-column:2}
.messages{padding:15px}
.header{padding:11px}
.header p{display:none}
.header h1{font-size:15px}
.deadline{font-size:12px;padding:8px;max-width:48%;overflow:hidden;text-overflow:ellipsis}
.stage{grid-template-columns:1fr 1fr}
.stage div:nth-child(2){color:var(--muted)}
.edit-project{grid-template-columns:1fr}
.edit-stage{grid-template-columns:1fr 1fr}
.edit-stage .remove-stage{grid-column:2}
.edit-head{display:none}
}
@media(max-width:760px){
body{background:#fff}
.shell{grid-template-columns:minmax(0,1fr)}
.sidebar{position:fixed;left:0;top:0;bottom:0;width:100%;z-index:5;transform:translateX(-100%);transition:transform .2s ease;background:#fff}
.sidebar.open{transform:none}
.mobile-sidebar-head{height:50px;padding:0 16px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);font-weight:700;font-size:17px}
.mobile-sidebar-head button{font-size:25px;line-height:1;color:var(--muted)}
.mobile-menu{display:grid;place-items:center;flex:0 0 34px;width:34px;height:34px;border-radius:50%;background:#f1f4f6;color:#385062;font-size:29px;line-height:1}
.empty-main{display:none}
.main{grid-column:1}
.header{padding:8px 12px;gap:8px;min-height:56px}
.header .round{width:38px;height:38px;flex:0 0 38px}
.search{padding:9px 14px}
.search input{padding:9px 11px}
.section-title{padding:12px 16px 5px;font-size:13px}
.workspace-toggle{padding:13px 16px 10px}
.workspace-toggle span{font-size:16px}.team-caption{padding:12px 16px 6px}.employee-item{padding:7px 16px}
.section-toggle{padding:13px 16px 6px}
.item{grid-template-columns:42px minmax(0,1fr) auto;gap:10px;padding:8px 16px}
.item .round{width:40px;height:40px;font-size:13px}
.item h4{font-size:15px;line-height:1.2;-webkit-line-clamp:1}
.item p{font-size:12px;line-height:1.2;margin-top:2px}
.folder{padding:7px 16px;font-size:12px}
.messages{padding:12px 14px}
.message{max-width:92%;padding:9px 11px;margin:8px 0}
.compose{padding:9px 12px;gap:7px}
.compose textarea{height:42px}
.send{padding:0 12px;font-size:13px}
.modal-back{align-items:flex-start;overflow-y:auto;padding:10px}
.modal{max-height:calc(100dvh - 20px);margin:0 auto;padding:17px;border-radius:14px}
.modal-head{position:sticky;top:-17px;z-index:2;background:#fff;padding-top:17px}
.modal .close{display:grid;place-items:center;min-width:34px;height:34px;border-radius:50%;background:#f1f4f6;color:#52616b}
.meta{grid-template-columns:1fr;gap:7px}
.project-modal-back{padding:0;overflow:hidden}
.project-plan{width:100%;height:100dvh;max-height:100dvh;margin:0;padding:16px 18px 30px;border:0;border-radius:0;overflow-y:auto}
.project-plan .modal-head{top:-16px;padding-top:16px}.project-plan h2{font-size:21px;line-height:1.2}.project-plan .modal-head p:last-child{margin-bottom:0}
.project-plan .meta{margin:14px 0}.project-plan .meta div{padding:12px}.project-plan .stage{padding:13px 0;gap:8px;font-size:13px}.project-plan .stage-heading{font-size:12px}.project-plan .rule{margin-top:14px;padding:13px;font-size:13px}.project-plan .close{min-width:36px;background:#303030;color:#eee}
}
@media(max-width:760px){
body{background:#202020;color:#eeeeee}
.sidebar{background:#202020;border-color:#2d2d2d}
.mobile-sidebar-head{background:#202020;border-color:#2d2d2d;color:#f2f2f2}
.workspace-toggle{border-color:#2d2d2d;color:#eee}.workspace-toggle small,.team-caption{color:#999}
.employee-item b{color:#eee}.employee-item small{color:#9b9b9b}.section-toggle{color:#eee}
.mobile-sidebar-head button{color:#aaa}
.search{border-color:#2d2d2d}
.search input{background:#202020;color:#eee;border-radius:0;padding:10px 0}
.search input::placeholder{color:#838383}
.section-title{color:#f0f0f0}
.badge{background:#4b3c2d;color:#f6c17f}
.item{color:#eee}
.item:hover,.item.active{background:#292929}
.item p,.item-meta{color:#9b9b9b}
.item .unread{background:#f3aa62;color:#252525}
.folder{background:#202020;border-color:#2d2d2d;color:#eee;font-weight:700}
.primary{background:transparent;color:#aaa;border:1px dashed #777;padding:6px 13px}
.sidebar-create button{color:#aaa;border:1px dashed #777;border-radius:8px;padding:6px 12px}
.main{background:#202020}
.header,.compose{background:#202020;border-color:#2d2d2d}
.header h1{color:#eee}
.mobile-menu{background:#303030;color:#eee}
.messages{background:#202020}
.message{background:#292929;border-color:#383838;box-shadow:none;color:#eee}
.message.me{background:#263b48}
.message time{color:#aaa}
.compose textarea{background:#292929;border-color:#3b3b3b;color:#eee}
.send{background:#477eaa}
.compact-form input{background:#292929;border-color:#3b3b3b;color:#eee}
.compact-form select{background:#292929;border-color:#3b3b3b;color:#eee;border-radius:8px;padding:10px}
.members small{color:#aaa}
.channel-actions{color:#aaa}
}
