.workspace-tools { display:flex; align-items:center; gap:12px; min-height:44px; padding:6px 16px; background:#fff; border-bottom:1px solid var(--line); position:relative; z-index:15; }
.workspace-tools button { display:inline-flex; align-items:center; justify-content:center; gap:8px; border:1px solid #deded6; border-radius:20px; padding:6px 10px; min-height:30px; background:#fff; color:#24251f; font:600 11px/16px Manrope,system-ui,sans-serif; cursor:pointer; }
.window-menu-wrap { margin-left:auto; position:relative; }
.window-menu { position:absolute; right:0; top:38px; width:280px; max-width:calc(100vw - 32px); max-height:65dvh; overflow:auto; padding:12px; background:white; border:1px solid #deded6; border-radius:10px; box-shadow:0 8px 32px #0003; }
.window-menu label { display:flex; align-items:center; gap:10px; padding:8px 4px; font-size:12px; cursor:pointer; }
.window-menu input { width:16px; height:16px; min-height:16px; margin:0; accent-color:#d9ad00; }
.window-menu button { width:100%; margin-top:8px; }
.window-canvas { position:relative; display:block; min-width:0; height:calc(100dvh - 220px); min-height:420px; isolation:isolate; }
.app-window { position:absolute; margin:0; padding:0; min-width:0; display:flex; flex-direction:column; border-radius:12px; overflow:clip; box-shadow:0 3px 14px #26302107; }
.app-window.window-closed { display:none !important; }
.app-window.window-maximized { inset:0 !important; width:100% !important; height:100% !important; z-index:10000 !important; }
.window-header { display:flex; align-items:center; gap:8px; padding:10px 12px; min-height:42px; flex-shrink:0; background:#fff; border-bottom:1px solid #eeeee8; cursor:grab; touch-action:none; user-select:none; }
.window-header:active { cursor:grabbing; }
.window-header h2 { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:12px; line-height:18px; margin:0; }
.window-grip { width:8px; height:16px; background:radial-gradient(circle,#a5a79b 1px,transparent 1.5px) 0 0/4px 4px; flex-shrink:0; }
.window-header button { flex-shrink:0; border:0; background:transparent; min-height:24px; padding:4px; color:#85877b; border-radius:4px; }
.window-header button:hover { color:#171815; background:#f2f2ed; }
.window-header button .icon { width:13px; height:13px; }
.window-body { flex:1; min-height:0; overflow:auto; padding:16px; scrollbar-width:thin; }
.window-body > h2 { margin-top:0; }
.window-body .section-details > summary { font-size:12px; }
.window-resize { position:absolute; bottom:0; right:0; width:18px; height:18px; min-height:18px !important; padding:0 !important; background:linear-gradient(135deg,transparent 45%,#b5b6aa 46%,#b5b6aa 50%,transparent 51%,transparent 60%,#b5b6aa 61%,#b5b6aa 65%,transparent 66%) !important; border:0 !important; border-radius:0 !important; cursor:nwse-resize !important; touch-action:none; }
.window-body #attachmentPreview { display:block; border:1px solid #e7e7df; width:100%; height:380px; background:#f6f6f0; margin-bottom:12px; }
.window-body #attachmentPreview[hidden] { display:none; }
.window-body .message-footer { margin-top:16px; }
.window-body pre { max-height:none; }
.window-body .specification-panel { min-height:0; }
.document-workspace .window-body .grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
.document-workspace .window-body .row { gap:8px; }
.document-workspace .window-body #actions > button { flex:1 1 120px; }
.inbox-work.window-canvas { height:calc(100dvh - 136px); min-height:420px; }
.inbox-page .inbox-list { min-height:calc(100dvh - 136px); }
.inbox-page .message-panel { min-height:0; }
.app-window.specification-panel { min-height:0; }
.editor-page #tbl { min-width:760px; width:100%; }
.editor-page #tbl > thead > tr > th { font-size:9px; padding:10px 6px; }
.editor-page #tbl > tbody > tr > td { font-size:11px; padding:10px 6px; }
.editor-page #tbl .product-cell { width:32%; min-width:180px; }
.editor-page #tbl .product-fields { width:100%; min-width:0; border:0; border-collapse:collapse; margin:0; }
.editor-page #tbl .product-fields td,.editor-page #tbl .product-fields th { border:0; padding:2px 0; min-width:0; max-width:240px; background:transparent; text-align:left; font-size:10px; overflow-wrap:anywhere; }
.editor-page #tbl .product-fields > tbody > tr > td[contenteditable] { font-weight:600; }
.editor-page #tbl .product-fields input { width:100%; min-width:0; text-align:left; font-size:10px; min-height:24px; padding:2px 6px; border-color:#e8e8e0; }
.editor-page #tbl .product-fields th { width:76px; padding-right:8px; white-space:normal; }
.product-details { margin-top:4px; }
.product-details > summary { font-size:9px; color:#888a7d; cursor:pointer; }
.editor-page #tbl > tbody > tr > td > input { width:64px; font-size:11px; padding:4px; }
.editor-page #tbl .controls { white-space:normal !important; width:64px; }
.editor-page #tbl .controls button { min-height:24px; padding:4px; font-size:9px; }
.editor-page #tbl .controls .icon { width:12px; height:12px; }
.editor-page #tbl .amount { font-weight:700; white-space:nowrap; }
.editor-page #tbl .price-explanation { white-space:normal; min-width:0; font-size:10px; }
.editor-page #tbl .product-details .imgcell img { max-width:100%; }
.editor-page main { margin-bottom:0; min-height:calc(100dvh - 44px); padding-bottom:12px; }
.window-body .section-heading:empty { display:none; }
@media (min-width:701px) {
  .inbox-page .inbox-list { height:calc(100dvh - 136px); min-height:0; display:flex; flex-direction:column; }
  .inbox-page .message-list { flex:1; overflow:auto; min-height:0; scrollbar-width:thin; }
}
.sidebar-collapsed { --sidebar:68px; }
.brand { overflow:hidden; }
.brand svg { flex-shrink:0; }
.brand > span,.app-nav a > span { display:block; max-width:180px; opacity:1; overflow:hidden; white-space:nowrap; }
.workspace-label { max-height:40px; overflow:hidden; opacity:1; }
#hUser > span { max-height:80px; opacity:1; }
.sidebar-collapsed .app-header { padding:24px 16px 16px; }
.sidebar-collapsed .brand > span,.sidebar-collapsed .app-nav a > span { max-width:0; opacity:0; }
.sidebar-collapsed .brand,.sidebar-collapsed .app-nav a { gap:0; }
.sidebar-collapsed .workspace-label { max-height:0; opacity:0; margin:0; }
.sidebar-collapsed #hUser > span { max-height:0; opacity:0; }
.sidebar-collapsed .app-nav { top:94px; padding:0 8px; }
.sidebar-collapsed .app-nav a { padding:12px 16px; }
.sidebar-collapsed #hUser { align-items:center; }
.sidebar-collapsed #hUser .hbtn { padding:4px; font-size:9px; }
.motion-ready body { transition:padding-left 320ms cubic-bezier(.22,.8,.2,1); }
.motion-ready body > .app-header { transition:width 320ms cubic-bezier(.22,.8,.2,1),padding 320ms cubic-bezier(.22,.8,.2,1); }
.motion-ready .app-nav { transition:width 320ms cubic-bezier(.22,.8,.2,1),top 320ms cubic-bezier(.22,.8,.2,1),padding 320ms cubic-bezier(.22,.8,.2,1); }
.motion-ready .brand,.motion-ready .app-nav a { transition:gap 320ms cubic-bezier(.22,.8,.2,1),padding 320ms cubic-bezier(.22,.8,.2,1),background-color 160ms; }
.motion-ready .brand > span,.motion-ready .app-nav a > span { transition:max-width 320ms cubic-bezier(.22,.8,.2,1),opacity 160ms; }
.motion-ready .workspace-label,.motion-ready #hUser > span { transition:max-height 320ms cubic-bezier(.22,.8,.2,1),margin 320ms cubic-bezier(.22,.8,.2,1),opacity 160ms; }
.cards .card { transition:transform 180ms ease,box-shadow 180ms ease; }
.app-window.window-moving { box-shadow:0 16px 40px #26302126; opacity:.93; cursor:grabbing; }
.app-window.window-resizing { border-color:#d3b84b; box-shadow:0 0 0 2px #e8cf6c40; }
.window-drop-preview { position:absolute; z-index:20000; pointer-events:none; border:2px solid #d8b329; border-radius:12px; background:#fff5c4d9; display:grid; place-items:center; padding:20px; color:#675215; font-size:12px; font-weight:600; text-align:center; backdrop-filter:blur(2px); }
.window-header:hover .window-grip { background:radial-gradient(circle,#9d873b 1px,transparent 1.5px) 0 0/4px 4px; }
@media (max-width:1000px) {
  .window-canvas,.inbox-work.window-canvas { display:flex; flex-direction:column; height:auto !important; min-height:0; gap:12px; }
  .app-window,.app-window.window-maximized { position:relative; inset:auto !important; width:100% !important; height:auto !important; min-height:0; max-height:none; }
  .window-header { cursor:default; touch-action:auto; }
  .window-body { max-height:70dvh; }
  .window-resize { display:none; }
  .window-body #attachmentPreview { height:340px; }
  .inbox-page main { grid-template-columns:240px minmax(0,1fr); }
}
@media (max-width:700px) {
  .inbox-page .inbox-list { min-height:0; height:auto; }
  .workspace-tools { padding:8px 12px; }
  .sidebar-collapsed .app-header { padding:12px 16px; }
  .sidebar-collapsed .brand > span,.sidebar-collapsed #hUser > span { max-width:180px; max-height:80px; opacity:1; }
  .sidebar-collapsed .brand { gap:10px; }
  .sidebar-collapsed .brand { font-size:20px; }
  .app-nav { max-height:100px; opacity:1; }
  .sidebar-collapsed .app-nav { display:flex; max-height:0; opacity:0; padding:0 8px; pointer-events:none; }
  .sidebar-collapsed .app-nav a > span { max-width:180px; opacity:1; }
  .motion-ready .app-nav { transition:max-height 280ms cubic-bezier(.22,.8,.2,1),padding 280ms cubic-bezier(.22,.8,.2,1),opacity 160ms; }
  .sidebar-collapsed #hUser { align-items:flex-end; }
  .sidebar-collapsed #hUser .hbtn { padding:2px 8px; font-size:10px; }
  .window-body { padding:12px; max-height:none; }
  .window-header { padding:10px; }
  .window-header h2 { font-size:11px; }
  .document-workspace .window-body .grid { grid-template-columns:1fr; }
  .window-canvas,.inbox-work.window-canvas { gap:8px; }
}
@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after { transition:none !important; animation:none !important; scroll-behavior:auto !important; }
}
