/* Layout revision: keep the conversation and composer visible. */
:root{--shadow:0 3px 18px #142b4810;--line:#e3e9f1;--ink:#172638;--muted:#63758a}
body{background:#f6f8fc}
.auth-screen{background:radial-gradient(ellipse at 20% 10%,#e8efff,transparent 55%),#f6f8fc;overflow:auto}
.auth-box{border-radius:20px;padding:32px;border-color:#e1e8f2;box-shadow:0 20px 70px #1d3c6812}
.auth-box h1{font-size:26px;letter-spacing:-.7px;margin:12px 0}
.auth-box p{font-size:14px;line-height:1.6}
.auth-box .brand{padding:0;margin-bottom:24px}
.auth-form{gap:14px}.auth-form[hidden]{display:none!important}
.auth-form label{display:grid;gap:7px;font-size:13px;font-weight:600;color:#425671}
.auth-form input{width:100%;min-height:44px;border-radius:10px!important;padding:10px 12px;font-size:16px}
.auth-form .primary{min-height:44px;margin-top:6px;border-radius:10px}
.auth-error:empty,.auth-success:empty{display:none}
button{font-weight:600!important}
button:hover{transform:none}
.app-shell,body.copi-pc-mode .app-shell{grid-template-columns:240px minmax(0,1fr);height:100dvh;overflow:hidden}
.sidebar{display:flex;flex-direction:column;height:100dvh;padding:16px 12px;background:#fff;overflow:auto}
.brand{background:none;border:0;box-shadow:none;padding:8px 10px;margin-bottom:18px;gap:12px}
.brand-mark{width:36px;height:36px;border-radius:12px;box-shadow:none;background:#e9efff}
.brand strong{font-size:19px;color:#182944}.brand span{color:#66778b!important}
.nav{gap:3px;flex:1;align-content:start}
.nav-item{min-height:42px;border-radius:9px;font-size:14px}
.nav-item.active{box-shadow:none;background:#edf2ff;color:#254edb;border-color:transparent}
.admin-user-switcher{position:static;margin:20px 0 0;background:#f5f7fb;color:#27374c;box-shadow:none;border:1px solid var(--line);flex-shrink:0}
.admin-user-switcher span,.admin-user-switcher strong{color:#51667d}
.admin-user-switcher button{background:white;color:#31465d;border-color:var(--line)}
main{padding:0 24px 20px;display:flex;flex-direction:column;min-height:0;height:100dvh;overflow:auto}
.topbar{position:static;margin:0 -24px 16px;padding:16px 24px;background:#fff;border-radius:0;box-shadow:none;min-height:74px;align-items:center;flex-shrink:0;flex-direction:row;justify-content:space-between}
.topbar h1{font-size:21px;letter-spacing:-.6px;margin:0}
.topbar .eyebrow,.topbar p,.build-label,.latency-panel,.copi-mode-toggle{display:none!important}
.status-strip{gap:7px;align-items:center;justify-content:flex-end}
.status-strip .status{font-size:11px;font-weight:500;min-height:24px;padding:5px 8px}
#sessionLabel{max-width:180px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#refreshBtn,#logoutBtn{padding:8px 10px;font-size:12px;border-radius:8px;background:#fff}
.hero-panel,.section-head,.panel{border-radius:14px;box-shadow:none}
.hero-panel{padding:18px;display:flex;justify-content:space-between;align-items:center;gap:16px}
.hero-panel h2{font-size:22px;margin:4px 0}.hero-panel p{font-size:13px;line-height:1.5;margin:4px 0 0}
.hero-panel .eyebrow{font-size:10px;letter-spacing:1px}
.hero-actions{gap:7px;justify-content:flex-end;flex-wrap:wrap}
.hero-actions button{font-size:12px;padding:9px 11px}
.section-head{padding:14px;margin:12px 0}.section-head h2{font-size:17px}
#agencyView.active-view{display:flex;flex:1;flex-direction:column;min-height:0;gap:14px}
#agencyView>.hero-panel{padding:0;border:0;background:none;flex-direction:row;flex-shrink:0;margin:0;min-height:0}
#agencyView>.hero-panel p{max-width:500px}
#agencyView>.section-head{display:none}
.agency-chat-shell{display:flex;flex:1;min-height:0;gap:0}
.agency-conversations-panel,.agency-context-panel{display:none}
.agency-chat-panel{width:100%;height:auto!important;min-height:0!important;max-height:none!important;padding:0;display:flex;flex-direction:column;overflow:hidden;border:1px solid var(--line)}
.agency-chat-panel>.panel-title{padding:16px 20px;margin:0;background:#fff;min-height:62px}
.panel-title h3{font-size:15px}.pill{font-weight:500;font-size:11px}
.chat-context{padding:10px 20px;margin:0;border:0;border-radius:0;background:#f9fbfd;color:#6a7e95;font-size:12px}
.agency-chat-panel .messages{flex:1;min-height:0!important;max-height:none!important;padding:20px;border:0;border-radius:0;background:#f8fafd;overflow:auto}
.chat-form{flex-shrink:0;position:static;margin:0;padding:12px 16px;border:0;border-top:1px solid var(--line);border-radius:0;box-shadow:none;background:white;grid-template-columns:40px minmax(0,1fr) 42px;gap:8px}
.chat-form input:not([type=file]){min-width:0;min-height:42px!important;border:1px solid var(--line);border-radius:10px!important;background:#f8fafc!important;font-size:14px}
.chat-form button{min-height:42px;padding:8px;border-radius:10px}
.attach-button{font-size:0!important;min-width:40px}.attach-button .icon{font-size:12px}
.attachment-status:empty{display:none}
.messages .empty-state{padding:24px;color:#6b7f94}
.mini-metrics{gap:7px;display:flex;flex-shrink:0;width:auto}.mini-metrics article{padding:6px 9px;background:#edf2f9;border:0;border-radius:7px;font-size:10px;box-shadow:none;min-width:60px}.mini-metrics strong{font-size:16px}.mini-metrics span{font-size:9px}
.agency-nav-agent-block,.agency-nav-group-block{background:none;border:0;padding:4px;box-shadow:none}
.agency-nav-agent,.agency-nav-group{background:transparent;color:#324963!important;border-color:transparent}
.agency-nav-agent strong,.agency-nav-agent small,.agency-nav-group strong,.agency-nav-group small{color:inherit!important}
.agency-nav-agent.active-agent{background:#edf2ff;color:#244bd3!important;border-color:#dbe4ff}
.agency-nav-agent:hover{background:#f4f7fb}
.agency-client-group{background:#f8faff;border:1px solid #e3e9f1}
.agency-client-toggle{background:#edf2f9;color:#354c68}
.agency-client-toggle small{color:#4b6280}
.agency-nav-agents{border-top-color:#e3e9f1}
.agency-chat-shell .chat-context:empty{display:none}
.agency-chat-shell .messages{display:block}
#clientView>.section-head:not(:has(form)){display:none}
#clientView .workspace-chat{min-height:360px;height:50dvh;border-radius:14px}
@media(min-width:1180px){
 #clientView.active-view{display:grid;grid-template-columns:minmax(0,1fr) 285px;gap:14px;align-items:start}
 #clientView>.hero-panel,#clientView>.section-head{grid-column:1/-1;margin:0}
 #clientFilesPanel{grid-column:2;grid-row:3;padding:16px;font-size:12px}
 #clientFilesPanel form{display:grid;grid-template-columns:1fr;gap:8px}
 #clientFilesPanel input{min-width:0;max-width:100%}
 #clientView .workspace-chat{grid-column:1;grid-row:3;margin:0;padding:0}
 #clientView .workspace-chat>.panel-title{padding:14px 18px;margin:0}
 #clientView .workspace-chat .messages{min-height:0;max-height:none;border:0;border-radius:0;margin:0}
}
@media(max-width:760px){
 .app-shell,body.copi-mobile-mode .app-shell{height:100dvh!important;min-height:0!important;display:flex;flex-direction:column;overflow:hidden}
 .sidebar,body.copi-mobile-mode .sidebar{position:static;display:block;height:auto;min-height:0;max-height:150px;padding:8px 12px;overflow:auto;flex-shrink:0;border-bottom:1px solid var(--line)}
 .sidebar .brand,body.copi-mobile-mode .sidebar .brand{display:none}
 .nav,body.copi-mobile-mode .sidebar .nav{display:flex;flex-wrap:wrap;gap:4px;overflow:visible;padding:0}
 .nav>.nav-item,body.copi-mobile-mode .sidebar .nav-item{flex:0 0 auto;width:auto;min-height:36px;padding:7px 10px;font-size:12px}
 .agency-nav-agents,body.copi-mobile-mode .agency-nav-agents{display:flex!important;width:100%;overflow:auto;margin:3px 0 0;padding:0}
 .agency-nav-agents>div{display:flex;gap:4px;min-width:max-content}.agency-nav-agents>p{display:none}
 .sidebar-tasks,body.copi-mobile-mode .sidebar-tasks{display:none!important}
 .admin-user-switcher{display:none!important}
 main,body.copi-mobile-mode main{height:auto;min-height:0;flex:1;overflow:auto;padding:0 10px 10px;display:flex;flex-direction:column}
 .topbar,body.copi-mobile-mode .topbar{position:static;display:flex;margin:0 -10px 10px;padding:10px 12px;min-height:50px;gap:6px;flex-wrap:wrap}
 .topbar h1,body.copi-mobile-mode .topbar h1{font-size:16px}.topbar .status-strip{margin:0;width:auto;flex:0 1 auto;gap:4px}
 #sessionLabel,#refreshBtn{display:none}.status-strip #logoutBtn{font-size:11px;padding:6px;flex:none}
 #agencyView.active-view{min-height:0;gap:8px}
 #agencyView>.hero-panel{padding:0 3px}.hero-panel h2{font-size:18px}.hero-panel p{font-size:12px}
 #agencyView>.hero-panel p,#agencyView>.hero-panel .eyebrow,#agencyKpis{display:none}
 .agency-chat-shell,body.copi-mobile-mode .agency-chat-shell{display:flex!important;flex:1;min-height:0}
 .agency-chat-panel,body.copi-mobile-mode .agency-chat-panel{min-height:0!important;height:auto!important;border-radius:12px}
 .agency-chat-panel .messages,body.copi-mobile-mode .agency-chat-panel .messages{min-height:0!important;max-height:none!important;padding:12px}
 .agency-chat-panel>.panel-title{min-height:48px;padding:10px 12px}.chat-context{padding:8px 12px;font-size:11px}
 .chat-form,body.copi-mobile-mode .chat-form{position:static;bottom:auto;grid-template-columns:36px minmax(0,1fr) 40px;padding:9px 8px calc(9px + env(safe-area-inset-bottom));margin:0;border-radius:0}
 .chat-form button{min-width:36px;min-height:40px}.chat-form input{font-size:16px!important}
 .hero-panel,body.copi-mobile-mode .hero-panel{padding:14px;display:block}
 .hero-actions,body.copi-mobile-mode .hero-actions{display:flex;flex-wrap:wrap;margin-top:12px;gap:6px}
 #clientView .inline-form{display:grid;grid-template-columns:1fr}.inline-form input{min-width:0}
 .section-head{display:block}.section-head form{margin-top:12px}
}
