/* Logic Chat compact workspace — maximizes usable viewport without shrinking readability. */
@media (min-width: 901px) {
  .app-shell{font-size:13px}
  .app-shell{grid-template-columns:182px minmax(0,1fr)}
  .sidebar{padding:14px 9px;background:linear-gradient(180deg,#153128 0%,#10261f 60%,#0d211b 100%);border-right:1px solid rgba(255,255,255,.05)}
  .brand{gap:9px;padding:0 7px 14px;font-size:16px}
  .brand-mark{width:28px;height:28px;border-radius:8px;font-size:18px}
  .sidebar nav{gap:2px}
  .nav-item{gap:9px;padding:8px 9px;border-radius:8px;font-size:13px;color:#bdd0c9}
  .nav-item:hover{background:#203f35;color:#fff}
  .nav-item.active{background:linear-gradient(90deg,#2a5043,#23453a);color:#fff;box-shadow:inset 3px 0 0 var(--lime)}
  .workspace-card{padding:8px;border-radius:9px;background:#19372d;font-size:11px}
  .workspace-card small{font-size:9px}
  main{padding:0 16px 14px}
  .topbar{height:50px}
  .topbar h1{font-size:19px;margin:0}
  .topbar small{display:none}
  .top-actions{gap:7px}
  .icon-btn,.avatar{width:30px;height:30px}
  .section-actions{min-height:34px;margin-bottom:6px}
  .section-actions p{margin:0;font-size:12px}
  .action-group{gap:6px}
  .primary,.secondary{padding:7px 10px;font-size:12px;border-radius:7px}
  .panel{padding:12px;border-radius:12px}
  .inbox-shell{height:calc(100vh - 90px);min-height:540px}
  .logic-ai-shell{height:calc(100vh - 90px);min-height:540px}
  .ai-messages{min-height:0;padding:14px}
  .flow-studio{height:calc(100vh - 90px);min-height:590px;display:flex;flex-direction:column}
  .studio-toolbar{min-height:44px;padding:6px 10px;flex:0 0 auto}
  .flow-title input{font-size:14px!important;margin-top:1px!important;min-width:210px!important}
  .studio-actions{gap:4px!important;flex-wrap:nowrap!important;max-width:72%;overflow-x:auto;padding-bottom:1px}
  .studio-actions button{white-space:nowrap;padding:6px 8px;font-size:11px}
  .studio-layout{min-height:0!important;flex:1}
  .visual-canvas{min-height:0!important;height:100%}
  .visual-canvas svg{height:100%!important}
  .node-palette{padding:8px 7px}
  .node-palette>strong{margin-bottom:7px}
  .node-palette button{padding:6px 7px;font-size:12px}
  .node-inspector{padding:10px}
  .node-inspector label{margin:9px 0}
  .studio-footer{height:28px;padding:0 10px;font-size:10px}
  .keyboard-help{padding:3px 7px;font-size:9px}
  .hero{padding:17px 22px;border-radius:13px}
  .hero h2{font-size:28px;margin:7px 0 5px}
  .hero p{margin:4px 0;font-size:12px}
  .pill{padding:4px 8px;font-size:8px}
  .metrics{margin:7px 0;gap:7px}
  .metrics article{padding:9px 11px}
  .metrics strong{font-size:20px;margin:3px 0 1px}
  .metrics small{font-size:10px}
  .grid-two{gap:7px}
  .chart{height:125px;margin-top:8px}
  .flow-row{padding:9px 11px;gap:10px}
  .filters{padding:8px}
  .contact-filters{align-items:center;overflow-x:auto}
  .contact-filters input,.contact-filters select,.contact-filters button{min-width:128px;white-space:nowrap}
  .contact-filters #contact-search{min-width:220px}
  .contact-filters #contact-tag-filter{max-width:150px}
  th,td{padding:9px 11px}
  .channel-grid{gap:7px}
  .channel{gap:6px}
  .conversation-item{padding:11px}
  .inbox-filter{padding:12px}
  .chat-head{padding:10px 13px}
  .messages{padding:14px}
  .ai-chat-head{height:52px;padding:8px 13px}
  .ai-history-head{padding:12px}
  .ai-composer{margin:0 12px 4px}
  .app-legal-links{right:8px;bottom:4px;gap:8px;padding:3px 7px;font-size:9px;opacity:.72}
  #toast{right:14px;bottom:34px}
}

@media (min-width: 901px) and (max-height: 760px) {
  .topbar{height:44px}
  .topbar h1{font-size:18px}
  .section-actions{min-height:30px;margin-bottom:4px}
  .inbox-shell,.logic-ai-shell,.flow-studio{height:calc(100vh - 76px);min-height:480px}
  .hero{padding:13px 18px}
  .hero h2{font-size:25px;margin:5px 0 3px}
  .hero p{margin:4px 0}
  .metrics article{padding:10px 13px}
  .chart{height:110px}
}

@media (min-width: 761px) and (max-width: 900px) {
  .app-shell{grid-template-columns:68px minmax(0,1fr)}
  .sidebar{padding:14px 7px;background:linear-gradient(180deg,#153128,#0d211b)}
  .brand{padding:0 8px 14px}
  .brand-mark{width:30px;height:30px;font-size:18px}
  .nav-item{padding:9px;justify-content:center;border-radius:8px}
  .nav-item.active{background:#294b40;box-shadow:inset 3px 0 0 var(--lime)}
  .workspace-card{padding:8px;justify-content:center;background:#19372d}
  main{padding:0 12px 14px}
  .topbar{height:50px}
  .topbar h1{font-size:19px}
  .topbar small{display:none}
}

@media (max-width: 760px) {
  main{padding:0 12px 78px}
  .topbar{height:52px}
  .topbar h1{font-size:19px;margin:0}
  .topbar small{display:none}
  .section-actions{margin-bottom:7px;gap:6px;align-items:flex-start}
  .section-actions p{margin:4px 0;font-size:12px}
  .primary,.secondary{padding:9px 11px}
  .panel{padding:14px}
  .inbox-shell,.logic-ai-shell{min-height:calc(100vh - 150px)}
  .app-legal-links{display:none}
}

.report-panel{margin-bottom:12px}.report-trend{height:84px;display:grid;grid-template-columns:repeat(30,minmax(3px,1fr));align-items:end;gap:3px;padding:8px 2px 0}.report-trend span{height:100%;display:flex;align-items:flex-end}.report-trend i{display:block;width:100%;height:var(--bar);min-height:3px;border-radius:4px 4px 1px 1px;background:linear-gradient(180deg,#7567f8,#4f46e5);opacity:.9}.report-trend span:hover i{opacity:1;box-shadow:0 0 0 2px rgba(79,70,229,.14)}.report-legend{display:flex;gap:18px;margin-top:8px;color:var(--muted);font-size:12px}.report-legend span{display:flex;align-items:center;gap:6px}.report-legend i{width:8px;height:8px;border-radius:50%;background:#4f46e5}.report-legend .legend-outbound{background:#a99efc}.channel-report{display:flex;flex-wrap:wrap;gap:6px;margin-top:12px}.channel-report span{display:flex;gap:8px;align-items:center;padding:5px 8px;border-radius:999px;background:var(--soft);font-size:12px}.channel-report em{font-style:normal;color:var(--muted)}
.workload-panel{margin-bottom:12px}.workload-list{display:grid;gap:7px}.workload-list>div{display:grid;grid-template-columns:minmax(0,1fr) auto 100px;align-items:center;gap:12px;padding:9px 11px;border:1px solid var(--line);border-radius:10px}.workload-list span,.workload-list small{display:block}.workload-list small{margin-top:2px;color:var(--muted)}.workload-list em{padding:4px 7px;border-radius:999px;background:#fff1ec;color:#b34e29;font-style:normal;font-size:10px;font-weight:800;text-align:center}.workload-list em.quiet{background:var(--soft);color:var(--muted)}@media(max-width:600px){.workload-list>div{grid-template-columns:1fr auto}.workload-list em{grid-column:1/-1;text-align:left}}
.campaign-review{display:grid;grid-template-columns:1fr 1fr;gap:8px}.campaign-review span{display:grid;gap:3px;padding:11px;border:1px solid var(--line);border-radius:10px;background:var(--soft)}.campaign-review small{color:var(--muted);font-size:9px;font-weight:900}.campaign-review strong{overflow-wrap:anywhere}@media(max-width:600px){.campaign-review{grid-template-columns:1fr}}
