/* Wpisy: treść i rozmowa mają pierwszeństwo przed metadanymi. */
.leave-range-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px}
.leave-range-head button,.leave-range-grid button{min-height:44px;border:0;background:transparent;border-radius:8px;color:var(--ink);padding:4px;font:inherit}
.leave-range-head button{min-width:44px;font-size:24px}
.leave-range-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:2px}
.leave-range-grid>span{text-align:center;font-size:12px;color:var(--muted);padding:4px 0}
.leave-range-grid button.in-range{background:#e7f2f9;color:var(--primary)}
.leave-range-grid button.is-edge{background:var(--primary);color:#fff;font-weight:600}
.leave-range-grid button[aria-current=date]{box-shadow:inset 0 0 0 1px var(--primary)}
.leave-range-grid button:disabled{opacity:.3}
.leave-range-picker .help{margin:8px 0 0}
.app-shell #leave-request{width:480px;max-width:calc(100% - 16px);max-height:calc(100dvh - 16px);padding:16px;overflow:auto}
.app-shell #leave-request .stack-form{gap:12px}
.post-detail-page{width:100%;max-width:820px;min-width:0}
.app-shell .post-detail-page .page-heading{margin-bottom:16px}
.app-shell .post-detail-page h1{font-size:24px;line-height:30px;margin:0}
.app-shell .post-detail-page .post-card{padding:20px;margin:0}
.post-detail-actions,.post-admin-actions{display:flex;align-items:center;gap:4px;min-width:0}
.post-detail-actions{margin-top:16px;justify-content:space-between;gap:8px}
.post-admin-actions{margin-left:auto}
.post-detail-actions .icon-button,.post-detail-actions .comment-focus{display:inline-flex;align-items:center;justify-content:center;gap:4px;width:auto;min-width:40px;min-height:40px;padding:8px;border-radius:8px;border:0;background:transparent;color:var(--primary)}
.post-detail-actions .icon-button.is-pinned{background:#fff1d8;color:#8a5917}
.post-detail-actions button:hover{background:#edf5f9}
.post-detail-actions form{margin:0}
.post-comments{margin-top:16px}
.post-comments h2{font-size:15px;line-height:20px;margin:0 0 8px}
.post-comments .comments-list:empty{display:none}
.post-comments .comment{padding:12px 0;gap:8px}
.post-comments .comment>div{min-width:0;overflow-wrap:anywhere}
.post-comments .stack-form{gap:8px;margin-top:12px}
.post-comments>.stack-form:first-child{margin-top:0}
.post-comments textarea{min-height:68px;line-height:24px;resize:vertical;overflow-y:hidden}
.post-comments .stack-form>.button{justify-self:start;align-self:flex-start;width:fit-content}
.post-views{margin-top:16px;padding-top:8px;border-top:1px solid var(--line)}
.post-views>summary{display:flex;align-items:center;gap:8px;min-height:36px;font-size:13px;color:var(--muted);list-style:none}
.app-shell dialog.post-action-dialog{width:620px;max-width:calc(100% - 32px);max-height:calc(100dvh - 32px);padding:24px;overflow:auto;border-radius:12px}
.post-action-dialog .dialog-head{margin-bottom:16px}
.post-action-dialog .activity-row{flex-wrap:wrap;overflow-wrap:anywhere}
.app-shell dialog.subtask-dialog{width:480px}
.app-shell .subtask-form{gap:12px}
.subtask-form .form-actions{margin:0;padding-top:8px}
@media(max-width:760px){
 .app-shell dialog.subtask-dialog{width:calc(100% - 16px)}
 .app-shell .subtask-form :is(input,select){font-size:16px;min-height:44px}
 .app-shell .subtask-form .form-actions{gap:8px;padding-top:0}
 .subtask-form .form-actions .button{min-height:44px}
}
@media(max-width:760px){
 .app-shell .post-detail-page .post-card{padding:16px}
 .post-detail-actions .icon-button,.post-detail-actions .comment-focus{min-width:44px;min-height:44px;padding:8px}
 .comment-action-label{display:none}
 .post-comments textarea{font-size:16px}
 .app-shell dialog.post-action-dialog{width:calc(100% - 16px);max-width:calc(100% - 16px);max-height:calc(100dvh - 16px);padding:12px;border-radius:10px;scroll-padding:12px}
 .app-shell .post-action-dialog .dialog-head{gap:8px;margin-bottom:12px;min-height:36px;align-items:center}
 .app-shell .post-action-dialog .dialog-head h2{font-size:20px;line-height:26px;margin:0}
 .app-shell .post-action-dialog .dialog-head .icon-button{width:44px;height:44px;padding:0;margin:-4px -4px -4px 0}
 .app-shell .post-action-dialog .stack-form{gap:12px}
 .app-shell .post-action-dialog label>textarea{margin-top:6px;font-size:16px;line-height:24px;padding:8px 10px}
 .app-shell .post-action-dialog .stack-form>.button{min-height:44px;margin:0;padding:10px 14px}
 .app-shell #edit-post .post-edit-options select{height:44px;min-height:44px;margin:0;padding:8px 24px 8px 8px;border-radius:8px}
 .app-shell #edit-post .post-edit-options .upload-button{margin:0;border-radius:8px}
 .post-action-dialog .form-grid{grid-template-columns:minmax(0,1fr)}
}
.post-meta,.post-content,.post-author{min-width:0}
.compact-post-upload .upload-filename{display:grid;gap:4px;flex:1;min-width:120px}
.compact-post-upload .upload-filename>span{display:flex;align-items:center;gap:4px;max-width:100%;min-width:0}
.compact-post-upload .upload-filename>span>span{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.compact-post-upload .upload-filename button{flex-shrink:0;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border:0;border-radius:6px;background:transparent;color:var(--muted);font-size:20px;padding:0}
.compact-post-upload .upload-filename button:hover{background:#edf5f9;color:var(--primary)}
.app-shell #edit-post .post-edit-options{grid-template-columns:150px minmax(0,1fr);align-items:start}
.post-edit-options .compact-post-upload{align-items:flex-start}
.post-edit-options .compact-post-upload{flex-wrap:nowrap;gap:8px}
.post-edit-options .compact-post-upload .upload-button{width:44px;min-width:44px;height:44px;padding:0;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.post-edit-options .compact-post-upload .upload-filename{flex:1;min-width:0;align-self:center}
@media(max-width:760px){
 .app-shell #edit-post .post-edit-options{grid-template-columns:126px minmax(0,1fr);gap:8px}
 .post-edit-options .compact-post-upload .upload-filename{min-width:0;width:100%}
 .compact-post-upload .upload-filename button{width:44px;height:44px}
}
.post-body a,.pinned-copy a{color:var(--primary);text-decoration:underline;text-underline-offset:2px;overflow-wrap:anywhere}
.dashboard-page .pinned-copy a{display:inline;padding:0;border:0;background:transparent;font-size:inherit}
.app-shell .post-card{border-radius:12px;box-shadow:none}
.app-shell .post-head{gap:8px;margin:0 0 12px;align-items:flex-start}
.app-shell .post-head>.avatar{width:32px;height:32px;flex-shrink:0;border-radius:50%;font-size:12px}
.app-shell .post-head strong{display:block;overflow-wrap:anywhere;font-size:13px;line-height:18px;font-weight:600;color:var(--ink)}
.post-context{display:flex;align-items:center;flex-wrap:wrap;gap:4px 8px;color:#596671;font-size:13px;line-height:18px}
.post-date{white-space:nowrap}
.post-labels{display:inline-flex;align-items:center;gap:4px;min-width:0;max-width:100%}
.post-group{display:inline-flex;align-items:center;gap:4px;min-width:0;overflow-wrap:anywhere;color:#596671;font-size:13px;line-height:18px}
.app-shell .post-company-logo{display:block;width:60px;max-width:100%;height:18px;object-fit:contain;object-position:left center}
.app-shell .post-type-icon{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:0;border-radius:6px;background:#edf6fa;color:#00749e;flex-shrink:0}
.post-type-icon svg{width:16px;height:16px}
.app-shell .post-type-icon.post-type-important{background:#fff1d8;color:#8a5917}
.app-shell .post-type-icon.post-type-materials{background:#eef2f5;color:#536575}
.post-pin{display:inline-flex;align-items:center;gap:4px;color:#79541e}
.app-shell .post-content .post-body{max-width:72ch;height:auto;min-height:0;margin:0;font-size:16px;line-height:24px;color:#303b43;overflow-wrap:anywhere}
.post-content .link-preview,.post-content .attachments{max-width:100%;min-width:0;margin-top:12px}
.post-content .link-preview>span,.post-content .file-link>span{min-width:0;overflow-wrap:anywhere}
.post-content .link-preview>svg,.post-content .file-link>svg{flex-shrink:0}
.app-shell .post-content .attachments{display:grid;gap:12px;grid-template-columns:minmax(0,1fr)}
.app-shell .post-content .attachments .attached-image{display:block;width:fit-content;height:auto;max-width:100%;border-radius:8px;overflow:hidden}
.app-shell .post-content .attachments .attached-image img{display:block;width:auto;height:auto;max-width:min(100%,360px);max-height:400px;object-fit:contain;border-radius:8px;background:transparent}
.post-content video{max-width:100%}
.app-shell .post-content .post-actions{display:flex;align-items:center;flex-wrap:wrap;gap:4px 16px;height:auto;min-height:0;margin-top:12px;padding:0;border:0}
.app-shell .post-actions .text-button{min-height:32px;display:inline-flex;align-items:center;gap:4px;margin:0;padding:0;color:var(--primary);font-size:13px;line-height:18px}
.app-shell .post-actions .post-open{margin-left:0;font-size:13px;min-width:0}
.app-shell .post-expand{min-height:32px;margin:4px 0 0;padding:0;color:var(--primary)}
.post-menu{position:relative;margin-left:auto}
.post-menu>summary{display:flex;align-items:center;justify-content:center;list-style:none;width:32px;min-height:32px;margin:0;border-radius:6px;color:var(--muted)}
.post-menu>summary:hover,.feed-view-menu>summary:hover{background:#edf5f9;color:var(--primary)}
.compact-menu{position:absolute;right:0;top:100%;z-index:12;min-width:160px;padding:4px;background:#fff;border:1px solid var(--line);border-radius:8px;box-shadow:0 4px 16px #22334412}
.compact-menu a{display:flex;align-items:center;min-height:40px;padding:8px 12px;font-size:13px;line-height:18px;color:var(--primary);border-radius:4px;white-space:nowrap}
.compact-menu a:hover,.compact-menu a[aria-current]{background:#edf5f9}
.app-shell .dashboard-page .feed .post-card{display:grid;grid-template-columns:144px minmax(0,1fr);gap:0 24px;height:auto;min-height:0;padding:16px;margin-bottom:12px}
.dashboard-page .post-state{grid-column:1/-1;margin-bottom:12px}
.dashboard-page .post-meta{border-right:1px solid #e8edf0;padding-right:12px;align-self:stretch}
.app-shell .dashboard-page .post-head{display:flex;flex-direction:column;gap:8px;align-items:flex-start;margin:0}
.dashboard-page .post-context{flex-direction:column;align-items:flex-start;gap:4px;margin-top:4px}
.dashboard-page .post-content{max-width:618px}
@media(max-width:1000px){
 .app-shell .dashboard-page .feed .post-card{display:block}
 .dashboard-page .post-meta{border:0;padding:0;margin-bottom:12px}
 .app-shell .dashboard-page .post-head{display:flex;flex-direction:row;align-items:flex-start}
 .dashboard-page .post-context{flex-direction:row;gap:4px 8px;margin-top:0}
 .dashboard-page .post-labels::before{content:"·";margin-right:0;color:#87939c}
 .dashboard-page .post-content{max-width:none}
}
@media(max-width:760px){
 .app-shell .post-actions .text-button,.post-menu>summary{min-height:44px}
 .post-menu>summary{width:44px}
 .app-shell .post-expand{min-height:44px}
 .compact-menu a{min-height:44px}
 .app-shell .post-content .attachments .attached-image img{max-width:100%}
 .app-shell .post-content .post-actions{column-gap:12px}
}

.app-shell dialog.date-range-dialog{width:380px;max-width:calc(100% - 16px);max-height:calc(100dvh - 16px);padding:16px;border-radius:12px;overflow:auto}.date-range-dialog .dialog-head{min-height:44px;gap:8px;margin-bottom:8px}.date-range-dialog .dialog-head h2{font-size:20px;margin:0}.date-range-dialog .icon-button{width:44px;height:44px;font-size:26px}.date-range-cancel{min-height:44px;margin-top:12px}.date-range-dialog .leave-range-picker{min-width:0}.date-range-dialog .leave-range-grid button:focus-visible{outline:2px solid var(--primary);outline-offset:-2px}
