.topbar .crumb{min-width:0;gap:10px}
.topbar #crumb-current{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--ink)}
.topbar h1#crumb-current{font-size:28px;line-height:1.2;letter-spacing:-.7px;font-weight:700}
.workspace-view-controls{display:flex;align-items:center;flex-shrink:0}
.workspace-view-controls[hidden]{display:none}
.workspace-compact-page .content{padding-top:18px}
.crm-toolbar{flex-wrap:wrap;gap:10px;margin-bottom:18px}
.crm-toolbar-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;margin-left:auto;min-width:0}
.crm-toolbar-actions #crm-total,.crm-toolbar-actions [data-task-total]{margin:0 6px 0 0;flex:none;max-width:280px;font-size:11px;text-align:right}
.crm-toolbar-actions>.btn{min-height:36px}
.crm-toolbar-actions>.crm-actions{flex-shrink:0}
.course-create-tile{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:18px;min-height:300px;padding:30px;border:1.5px dashed color-mix(in srgb,var(--accent) 38%,var(--line));border-radius:var(--radius);background:color-mix(in srgb,var(--soft) 45%,var(--surface));color:var(--accent);transition:background-color .2s,border-color .2s,box-shadow .2s}
.course-create-tile strong{font-size:15px;font-weight:600}
.course-create-icon{width:60px;height:60px;display:grid;place-items:center;border-radius:50%;background:var(--soft);transition:transform .2s var(--ease),background-color .2s}
.course-create-icon .icon{width:27px;height:27px;stroke-width:1.5}
.course-create-tile:hover{background:var(--soft);border-color:var(--accent)}
.course-create-tile:hover .course-create-icon{background:var(--surface);transform:scale(1.08)}
.course-create-tile:active .course-create-icon{transform:scale(1.02)}
@media(max-width:1120px){
 .crm-toolbar-actions{gap:8px}
}
@media(max-width:700px){
 .workspace-compact-page .content{padding-top:14px}
 .topbar .crumb{flex:1;gap:0}
 .topbar h1#crumb-current{font-size:22px;letter-spacing:-.4px}
 .workspace-compact-page .topbar{height:auto;min-height:58px;flex-wrap:wrap;row-gap:0}
 .workspace-compact-page .topbar:has(.workspace-view-controls:not([hidden])){padding-bottom:8px}
 .workspace-compact-page .workspace-view-controls:not([hidden]){order:10;flex-basis:100%;padding-left:2px}
 .crm-toolbar-actions{width:100%;justify-content:flex-end;gap:8px}
 .crm-toolbar-actions #crm-total,.crm-toolbar-actions [data-task-total]{order:0;width:auto;max-width:none;white-space:normal;flex:1;margin:0 auto 0 0;text-align:left}
 .course-create-tile{min-height:190px}
 .course-create-icon{width:48px;height:48px}
}
@media(prefers-reduced-motion:reduce){.course-create-tile,.course-create-icon{transition:none}.course-create-tile:hover .course-create-icon{transform:none}}

.analytics-filter-top{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:12px}
.analytics-filter-top .analytics-periods{margin:0}
.analytics-filter-top>.btn{margin-left:auto}

@media(min-width:1450px){.workspace-compact-page .topbar{padding-inline:max(45px,calc((100% - 1500px)/2 + 45px))}body:has(.crm-page,.crm-tasks-page,.crm-hub,.bots-page) .topbar{padding-inline:45px}}

/* A full-width rule separates page controls from the open workspace. */
body[data-workspace=true] .topbar{position:static;background:transparent;border:0;border-bottom:1px solid var(--line);box-shadow:none;height:auto;min-height:72px;padding-block:16px;justify-content:flex-start}
body[data-workspace=true] .topbar .crumb{flex:0 1 auto}
@media(max-width:700px){body[data-workspace=true] .topbar{min-height:64px;padding-block:14px}body[data-workspace=true] .topbar .crumb{flex:1}}

/* Lists put search, filters and actions alongside their title and view switch. */
body[data-workspace=true] .topbar.has-page-tools{display:flex;flex-wrap:wrap;gap:12px;min-height:72px;padding-block:16px}
.topbar.has-page-tools .crumb{max-width:320px}
.topbar .workspace-page-tools{flex:1 1 500px;min-width:0;margin:0;gap:10px;flex-wrap:nowrap}
.workspace-page-tools .crm-search{width:clamp(150px,18vw,260px);flex:0 1 260px;min-width:140px}
.workspace-page-tools .crm-toolbar-actions{flex-shrink:0;gap:8px}
.workspace-page-tools .crm-toolbar-actions #crm-total,.workspace-page-tools .crm-toolbar-actions [data-task-total]{max-width:220px;margin-right:0;white-space:nowrap}
body:has(.topbar.has-page-tools) .content{padding-top:16px}
@media(min-width:701px) and (max-width:1100px){
 .topbar .workspace-page-tools{flex-basis:100%}
 .workspace-page-tools .crm-search{width:220px;flex-basis:220px}
}
@media(max-width:700px){
 body[data-workspace=true] .topbar.has-page-tools{gap:12px 8px;padding-block:14px}
 .topbar.has-page-tools .crumb{max-width:none}
 .workspace-compact-page .topbar.has-page-tools .workspace-view-controls:not([hidden]){order:0;flex-basis:auto;padding:0}
 .topbar .workspace-page-tools{flex-basis:100%;flex-wrap:wrap;gap:8px}
 .workspace-page-tools .crm-search{width:auto;flex:1;min-width:120px}
 .workspace-page-tools .crm-toolbar-actions{width:100%}
 .workspace-page-tools .crm-toolbar-actions #crm-total,.workspace-page-tools .crm-toolbar-actions [data-task-total]{max-width:none;white-space:normal}
}

/* Shared compact controls for courses, bots and reports. */
.workspace-filter-menu{position:relative;flex-shrink:0}
.workspace-filter-menu summary{list-style:none;cursor:pointer}
.workspace-filter-menu summary::-webkit-details-marker{display:none}
.workspace-filter-menu summary.is-active{color:var(--accent);border-color:var(--accent)}
.workspace-filter-menu>form{position:absolute;top:calc(100% + 8px);left:0;z-index:30;width:260px;max-width:calc(100vw - 32px);padding:16px;border:1px solid var(--line);border-radius:12px;background:var(--surface);box-shadow:0 10px 30px #00000018}
.workspace-filter-menu .account-field:last-child{margin-bottom:0}
.workspace-page-tools [data-course-total]{font-size:11px;white-space:nowrap}
.workspace-page-tools .course-overflow summary{width:36px;height:36px;border:1px solid var(--line);background:var(--surface)}
.workspace-page-tools .course-overflow>div{z-index:30}
.workspace-view-controls .course-back{margin:0;padding:7px;min-height:34px}
.topbar .workspace-page-tools.bot-toolbar{flex-wrap:wrap}
.workspace-page-tools.bot-toolbar .input-wrap{flex:0 1 260px;max-width:260px}
.workspace-page-tools.bot-toolbar .bot-save-state{min-width:0}
.topbar .workspace-page-tools.analytics-filter-top{flex-wrap:wrap}
.workspace-page-tools .analytics-periods{flex-wrap:wrap}
@media(max-width:700px){
 .workspace-filter-menu>form{left:auto;right:0}
 .workspace-page-tools [data-course-total]{margin-right:auto}
 .workspace-page-tools .course-heading-actions{flex-wrap:wrap}
 .workspace-page-tools.bot-toolbar .input-wrap{flex:1 1 180px;max-width:none}
 .workspace-page-tools .bot-editor-actions{flex-wrap:wrap}
}

/* Tables and canvases are working surfaces; cards represent individual items. */
body[data-workspace=true] .content:has(.crm-page,.crm-tasks-page,.crm-hub,.bots-page){max-width:none}
body[data-workspace=true] .crm-table.panel,
body[data-workspace=true] .crm-task-calendar.panel,
body[data-workspace=true] .bot-flow-list{border:0;border-radius:0;box-shadow:none;background:transparent}
body[data-workspace=true] .crm-table .data-table tr:last-child td{border-bottom:1px solid var(--line)}
body[data-workspace=true] .crm-column{border-radius:0;background:transparent}
body[data-workspace=true] .crm-column.is-over{background:var(--soft)}
body[data-workspace=true] .bot-editor{border:0;border-radius:0;box-shadow:none}
