/* Shared workspace components; colours and typography inherit the CRM theme. */
:root{--workspace-radius:12px;--workspace-gap:12px}
.content{padding:16px 20px 28px;min-width:0}.app-main{min-width:0}
.page-heading{border:1px solid #bfd0d2;border-radius:14px;overflow:visible;background:#eaf3f3;margin-bottom:14px}
.page-heading>.executive-header{padding:16px 18px!important;border-radius:13px 13px 0 0;min-height:0!important;margin:0;align-items:center;gap:14px}
.page-heading>.executive-header:last-child{border-radius:13px}
.executive-header h1{font-size:25px;line-height:1.2;margin:2px 0 5px}.executive-header p{margin:3px 0;line-height:1.35}
.page-heading>.header-nav{margin:0!important;width:100%!important;max-width:100%!important;padding:9px 12px!important;box-sizing:border-box;gap:6px;border-top:1px solid #ffffff30;border-radius:0 0 13px 13px;position:static;transform:none;background:#eaf3f3;flex-wrap:wrap}
.page-heading>.header-nav>a{min-height:32px;padding:6px 12px;box-shadow:none;border-radius:7px;font-size:13px}
.header-metrics{min-width:0;gap:8px}.header-metrics a{min-height:44px;padding:7px 12px}.header-metric strong{font-size:22px}
.sidebar .sidebar-nav a[data-label]:not(.brand){min-height:31px;padding-block:4px}.sidebar .sidebar-nav .nav-group{margin-bottom:5px}
.topbar{--control-height:40px;padding:10px 20px;gap:10px;min-height:60px}.topbar .top-actions{gap:7px}.topbar .topbar-attendance{gap:6px}.topbar .topbar-punch-time{min-width:78px;border-radius:8px}.topbar .global-search{min-width:170px}.topbar .global-search button{min-height:30px;height:30px}
button,.button,.secondary,.mini,summary{transition:background-color .15s,border-color .15s,box-shadow .15s}
:where(button,a,input,select,textarea,summary):focus-visible{outline:3px solid #4195a4;outline-offset:2px}

.panel,.form-panel,.editor-section{border-radius:var(--workspace-radius);box-shadow:0 2px 7px #123a4208}
.toolbar{gap:8px;margin:10px 0;align-items:center}.toolbar .filter{min-height:34px;max-width:100%;min-width:0}.view-tools{gap:8px}.pipeline-strip{margin:8px 0;gap:6px}.selection-help{padding:7px 10px;margin:8px 0}
.record-list-form .actions-column{min-width:110px!important;width:110px}.record-list-form .identity-column{max-width:230px}.record-list-form tbody tr:hover>td{background:#f1f7f7}.record-list-form td{line-height:1.35}.record-title{max-width:220px}.record-list-form .owner-cell{max-width:135px;overflow-wrap:anywhere}.status{white-space:normal;max-width:150px;line-height:1.3}
.workspace-popover{position:fixed!important;inset:auto;margin:0!important;box-sizing:border-box;border:1px solid #b8d0d0;border-radius:10px;background:#fff;color:#173e47;padding:6px;box-shadow:0 12px 35px #123a4230;max-height:min(420px,70dvh);overflow:auto;width:220px;max-width:calc(100vw - 24px)}
.workspace-popover:popover-open{display:flex;flex-direction:column;gap:3px}.workspace-popover::backdrop{background:transparent}.workspace-popover .menu-identity{border-bottom:1px solid #dce6e6;padding:6px 10px}.saved-view-menu[open]>.workspace-popover{width:300px;display:flex;gap:8px;align-items:stretch}
.workspace-menu-open .floating-chat-launcher{visibility:hidden}
.workflow-dialog{width:min(1080px,94vw);height:auto;max-height:90dvh;border-radius:14px;box-shadow:0 24px 80px #082c3638}.workflow-dialog[open]{display:flex;flex-direction:column}.workflow-dialog-bar{padding:8px 14px;min-height:42px;box-sizing:border-box}.workflow-dialog-bar button{min-height:30px}.workflow-dialog iframe{max-height:calc(90dvh - 50px);display:block;flex:none}
.embedded-workflow .content{padding:12px!important}.embedded-workflow .record-editor{padding:0!important}.embedded-workflow .recovery-status{margin:0 0 8px;padding:8px 10px;line-height:1.35;font-size:12px;border-radius:8px;background:#edf5f5}.paged-editor .section-head{padding:8px 10px!important;margin-bottom:10px;min-height:0}.paged-editor .section-head h2{font-size:16px}.paged-editor .section-number{font-size:12px}.paged-editor .form-grid{gap:12px 16px!important}.paged-editor .form-field>label{font-size:13px;margin:0}.paged-editor .form-field small{font-size:11px;line-height:1.3}.paged-editor .form-field input:not([type=checkbox]):not([type=radio]),.paged-editor .form-field select{min-height:36px;height:36px}.paged-editor .form-field textarea{min-height:64px;height:64px}
.field-learning{margin:0!important;padding:0!important;border:0!important;background:none!important}.field-learning>summary{display:inline-block!important;min-height:0!important;width:auto!important;padding:2px 0!important;font-size:11px!important;font-weight:400!important;color:#276a76!important;background:transparent!important;border:0!important;box-shadow:none!important;text-shadow:none!important;border-radius:0!important}.field-learning p{margin:4px 0;font-size:12px}.field-learning a{font-size:12px}
.wizard-footer{padding:9px 12px;background:#f5f9f9}.wizard-footer .step-controls{grid-template-columns:minmax(110px,1fr) auto minmax(110px,1fr)!important;background:none;border:0;padding:0!important;gap:12px!important;align-items:center}.wizard-footer .form-actions{justify-content:flex-end;padding:0!important;margin:0!important;gap:6px!important;align-items:center}.wizard-footer .form-actions>a,.wizard-footer .form-actions>button[type=reset]{display:none}.wizard-footer .form-actions button{min-height:34px;font-size:12px;padding:6px 9px}.wizard-navigation{gap:8px}.wizard-navigation [data-step]{max-width:160px;font-size:11px}.wizard-navigation button{min-width:65px;font-size:12px}.wizard-progress progress{max-width:160px;width:100%}.wizard-progress .step-progress-label{font-size:11px;line-height:1.25}.paged-editor{padding-bottom:95px!important}
.designer-grid{gap:14px;margin:12px 0;grid-template-columns:minmax(230px,.8fr) minmax(0,1.2fr)}.designer-catalog{gap:4px;max-height:340px}.designer-catalog .catalog-item{padding:7px 10px;min-height:34px;background:#f1f7f7!important;color:#173e47!important;border:1px solid #c6dadd!important;box-shadow:none!important;text-shadow:none!important}.designer-canvas{max-height:340px;min-height:120px}.designer-canvas li{padding:8px;margin:4px 0;gap:8px}.order-controls{gap:4px}.order-controls button{min-width:30px;min-height:30px;padding:4px 7px;font-size:12px}.workflow-form .helptext{font-size:12px;line-height:1.4}.workflow-form label{margin:6px 0}.access-matrix select{min-width:120px;max-width:190px;height:34px}.access-matrix td{padding:8px!important}.access-matrix th{white-space:normal}
.chat-centre{display:grid!important;grid-template-columns:260px minmax(0,1fr)!important;gap:12px;height:clamp(360px,calc(100dvh - 250px),720px);min-height:0}.chat-centre>.panel{height:100%;margin:0;box-sizing:border-box;min-height:0}.conversation-list{overflow:auto;padding:10px}.conversation-list>a{padding:10px!important;border-radius:8px;display:block;border-bottom:1px solid #dce6e6;margin-bottom:4px}.conversation-list>a small{display:block;margin-top:3px}.conversation-list>a.active{background:#e3f0f1}.chat-centre .message-panel{display:flex;flex-direction:column;padding:12px;overflow:hidden}.message-panel .message-head{flex:none;padding:4px 0 10px;margin:0}.message-panel .messages{flex:1;min-height:0;height:auto!important;max-height:none!important;overflow:auto;padding:10px 2px}.message-panel .message-composer{flex:none;margin:0;padding-top:10px;border-top:1px solid #d5e4e5;align-items:center}.message-composer textarea{min-height:54px;height:54px;resize:vertical;max-height:100px}.chat-centre .message{max-width:85%;padding:9px 12px}.chat-centre .message p{margin:4px 0;overflow-wrap:anywhere}
@media(min-width:900px){.embedded-workflow.paged-workflow .form-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}}
@media(max-width:899px){.wizard-footer .step-controls{grid-template-columns:minmax(0,1fr) auto!important}.wizard-navigation{grid-column:1/-1;grid-row:1}.wizard-progress{flex-direction:column;align-items:start}.wizard-footer .form-actions{grid-column:2;grid-row:2}.paged-editor{padding-bottom:140px!important}.chat-centre{grid-template-columns:200px minmax(0,1fr)!important}}
@media(max-width:700px){.content{padding:12px 12px 80px}.topbar{padding:9px 12px}.page-heading>.executive-header{padding:12px!important}.page-heading>.header-nav{padding:8px!important}.executive-header h1{font-size:22px}.designer-grid{grid-template-columns:1fr}.chat-centre{grid-template-columns:1fr!important;height:auto}.chat-centre .conversation-list{max-height:180px}.chat-centre .message-panel{height:calc(100dvh - 190px);min-height:340px}.workflow-dialog{width:96vw;max-height:94dvh}.wizard-navigation [data-step]{max-width:140px}.wizard-footer .step-controls{gap:7px!important}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
/* Tighten secondary actions and keep the main task visually distinct. */

.chat-centre{height:clamp(320px,calc(100dvh - 285px),680px)}.chat-centre .message-composer{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:8px}.message-composer .attachment-button{position:relative;display:grid;place-items:center;overflow:hidden;width:36px;height:36px;margin:0}.attachment-button input[type=file]{position:absolute;width:100%;height:100%;inset:0;opacity:0;cursor:pointer}.attachment-button:focus-within{outline:3px solid #4195a4;outline-offset:2px}
.wizard-footer .form-actions{border:0!important;background:none!important;box-shadow:none!important;border-radius:0!important}.workflow-dialog{min-height:0!important;inset:0;margin:auto;padding:0!important}.workflow-dialog iframe{margin:0!important}
body:has(.workflow-dialog[open]) .floating-chat-launcher{visibility:hidden}
@media(max-width:700px){.chat-centre{height:auto}.chat-centre .message-panel{height:65dvh}.topbar .top-actions{min-width:0;flex-wrap:wrap}.topbar .user-menu>summary{max-width:170px}.topbar .user-menu strong{max-width:120px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}
.workflow-dialog{height:fit-content!important}
body:has(.record-editor,.ats-editor,.workflow-form,form.form-panel,form.customizable-form,form[data-report-designer],form[data-form-designer]) :is(.floating-chat-launcher,.chat-dock){display:none!important}
@media(pointer:coarse){.sidebar .sidebar-nav a[data-label]:not(.brand){min-height:44px}}
