:root { --row-height:42px; }
#taskList .task-row { font-size:12px; line-height:14px; }
#taskList .task-name { gap:5px; }
#taskList textarea.inline-text,#taskList textarea.inline-comment { box-sizing:border-box; font:inherit; line-height:14px; padding:1px 3px; margin:0; height:32px; min-height:0; max-height:calc(var(--row-height) - 2px); resize:none; }
#taskList input.inline-text,#taskList .inline-date,#taskList .inline-status,#taskList .inline-progress,#taskList .predecessor-input { font-size:12px; line-height:16px; height:26px; padding-top:2px; padding-bottom:2px; }
#taskList .has-previous-value textarea.inline-text,#taskList .has-previous-value textarea.inline-comment { height:30px; min-height:0; line-height:13px; }
#taskList .previous-value { font-size:10px; line-height:11px; }
#riskTaskList .risk-group { margin:0 0 10px; border:1px solid var(--line); border-radius:8px; overflow:hidden; }
#riskTaskList .risk-group>summary { display:list-item; list-style:disclosure-closed inside; padding:12px; font-size:14px; font-weight:600; background:#fff6e6; }
#riskTaskList .risk-group[open]>summary { list-style-type:disclosure-open; }
#riskTaskList .risk-group>summary::-webkit-details-marker { display:inline; }
#riskTaskList .risk-group>p { padding:12px; margin:0; font-size:12px; }
#projectWorkspace .stats { grid-template-columns:repeat(6,minmax(0,1fr)); }
#riskCard { position:relative; min-width:0; background:white; border:1px solid var(--line); border-radius:12px; }
#riskCard summary { padding:20px; cursor:pointer; list-style:none; }
#riskCard summary::-webkit-details-marker { display:none; }
#riskCard summary span,#riskCard summary strong,#riskCard summary small { display:block; }
#riskCard summary span { color:var(--muted); font-size:12px; }
#riskCard summary strong { color:#b45309; font-size:28px; margin:8px 0; }
#riskCard summary small { color:var(--muted); font-size:11px; }
#riskTaskList { position:absolute; top:100%; right:0; width:min(540px,80vw); max-height:360px; overflow:auto; padding:16px; background:white; border:1px solid var(--line); border-radius:10px; box-shadow:0 12px 30px #17203330; z-index:50; }
#riskTaskList table { width:100%; border-collapse:collapse; font-size:13px; }
#riskTaskList th,#riskTaskList td { padding:10px 8px; text-align:left; border-bottom:1px solid var(--line); overflow-wrap:anywhere; }
@media(max-width:1100px){#projectWorkspace .stats { grid-template-columns:repeat(3,minmax(0,1fr)); }}
@media(max-width:700px){#projectWorkspace .stats { grid-template-columns:repeat(2,minmax(0,1fr)); }}
.card-today-line { position:absolute; top:0; bottom:0; width:2px; background:#dc3545; z-index:1; pointer-events:none; }
.epic-axis .card-today-line::before { content:'Сегодня'; position:absolute; top:2px; right:3px; font:10px sans-serif; color:#b42332; }
.owner-projects-link { border:0; background:transparent; color:inherit; padding:3px; font:inherit; text-align:left; max-width:calc(100% - 24px); overflow-wrap:anywhere; vertical-align:middle; }
.owner-projects-link:hover { text-decoration:underline; }
.sidebar .brand-lockup[role="button"] { cursor:pointer; }
.sidebar .brand-lockup[role="button"]:focus-visible { outline:2px solid #f7e31a; outline-offset:4px; }
.sidebar,.sidebar nav,.sidebar .project-tree { scrollbar-width:none; }
.sidebar::-webkit-scrollbar,.sidebar nav::-webkit-scrollbar,.sidebar .project-tree::-webkit-scrollbar { display:none; }
#sidebarResize { position:absolute; right:-4px; top:0; bottom:0; width:8px; cursor:col-resize; touch-action:none; z-index:10; }
#sidebarResize:focus-visible { outline:1px solid #f7e31a; }
body.resizing-sidebar { cursor:col-resize; user-select:none; }
@media(min-width:601px){.sidebar { width:var(--sidebar-width,220px); } main { margin-left:var(--sidebar-width,220px); min-width:0; }}
@media(max-width:600px){#sidebarResize { display:none; }}
#changesPeriodMenu { position:fixed; inset:auto; margin:0; padding:10px; width:260px; max-height:80vh; overflow:auto; border:1px solid #d8dce6; border-radius:10px; box-shadow:0 10px 35px #17203330; }
#changesPeriodMenu>button { display:block; width:100%; text-align:left; border:0; margin:2px 0; }
#changesCustom { padding:8px; }
#changesHint { padding:10px 16px; margin:0; font-size:12px; line-height:1.5; background:#fff6dc; }
.previous-value { display:block; color:#a34a58; font-size:11px; line-height:15px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; flex:none; max-width:100%; }
#taskList .has-previous-value { display:flex; flex-direction:column; align-items:stretch; justify-content:center; gap:1px; }
#taskList .has-previous-value textarea { height:24px; min-height:24px; }
#taskList .progress-cell.has-previous-value { display:grid; grid-template-columns:minmax(0,1fr) auto; align-content:center; }
#taskList .progress-cell.has-previous-value del { grid-column:1 / -1; }
.change-badge { font-size:10px; color:#237044; margin-right:4px; }
#projectActivityDialog { width:min(850px,95vw); max-height:90vh; overflow:auto; padding:28px; box-sizing:border-box; font-size:14px; line-height:1.55; }
#projectActivityDialog .modal-head { padding:0 0 16px; gap:20px; align-items:flex-start; }
#projectActivityDialog h2 { margin:0; font-size:22px; line-height:1.3; }
#projectActivityDialog p { margin:12px 0; }
#activityPeriodForm { display:flex; flex-wrap:wrap; align-items:flex-end; gap:14px; padding:16px; margin:20px 0; background:#f7f8fa; border-radius:10px; }
#activityPeriodForm label { margin:0; }
#activityPeriodForm .period-controls { gap:14px; margin:0; }
#projectActivityDialog .audit-entry { padding:18px 16px; }
#projectActivityDialog .audit-entry b { font-size:15px; line-height:1.45; overflow-wrap:anywhere; }
#projectActivityDialog .audit-entry small { font-size:12px; color:#657086; margin:8px 0; }
#projectActivityDialog .audit-entry pre { font:inherit; font-size:13px; line-height:1.6; margin:12px 0 0; }
#projectActivityDialog .activity-note { padding:12px 16px; background:#fff6dc; border-radius:8px; }
#activityHistory { border-top:1px solid #d8dce6; margin-top:24px; padding-top:16px; }
#activityHistoryEntries p { padding:12px 16px; background:#f7f8fa; border-radius:8px; }
@media(max-width:600px){#projectActivityDialog { padding:18px; } #activityPeriodForm { padding:12px; } }
#projectActivityEntries { max-height:50vh; overflow:auto; }
.people-picker { position:relative; display:flex; align-items:center; width:100%; min-width:0; }
.people-picker input { width:100%; min-width:0; padding-right:26px!important; }
.people-picker .people-arrow { position:absolute; right:2px; padding:3px 6px; border:0; background:transparent; }
.people-popup { position:fixed; inset:auto; margin:0; padding:5px; border:1px solid #d8dce6; border-radius:8px; background:white; color:#172033; overflow:auto; box-shadow:0 8px 25px #17203330; }
.people-popup button { display:block; width:100%; text-align:left; border:0; background:white; }
.people-popup button:hover,.people-popup button:focus { background:#f9edf1; }
#screenshotImportDialog { width:min(1000px,95vw); max-height:90vh; overflow:auto; }
.screenshot-table-wrap { overflow:auto; margin:16px 0; }
.screenshot-table-wrap table { width:100%; min-width:700px; }
.screenshot-table-wrap input { width:100%; min-width:100px; }
.screenshot-table-wrap td:first-child { width:40%; }
#screenshotRawText { white-space:pre-wrap; max-height:200px; overflow:auto; }
#userList .user-row { cursor:pointer; }
#userList .selected-user { background:#f9edf1; outline:1px solid var(--primary); }
#timelineHead > div { position:relative; overflow:hidden; }
.timeline-column-resizer { position:absolute; top:0; bottom:0; width:7px; cursor:col-resize; touch-action:none; z-index:2; }
.timeline-column-resizer.left { left:0; }
.timeline-column-resizer.right { right:0; }
.timeline-column-resizer:hover { background:#93153333; }
body.resizing-timeline-columns { cursor:col-resize; user-select:none; }
#ganttWrap { grid-template-rows:var(--plan-header-height,106px) auto; }
#ganttWrap .timeline-head .period-head { height:100%; }
#ganttWrap .timeline-head .day-head { padding-top:12px; }
#ganttWrap .filter-head { gap:3px; }
#headerResizeHandle { position:absolute; bottom:0; left:50%; transform:translateX(-50%); width:80px; height:10px; cursor:ns-resize; touch-action:none; z-index:40; display:grid; place-items:center; }
#headerResizeHandle::after { content:''; width:44px; height:3px; background:#a3aaba; border-radius:3px; }
#headerResizeHandle:hover::after,#headerResizeHandle:focus::after { background:var(--primary); }
body.resizing-plan-header { cursor:ns-resize; user-select:none; }
body.plan-fullscreen .context-menu { z-index:150; }
body.plan-fullscreen { overflow:hidden; }
body.plan-fullscreen #projectWorkspace > .panel { position:fixed; inset:0; z-index:100; margin:0; border-radius:0; display:flex; flex-direction:column; background:white; }
body.plan-fullscreen #projectWorkspace .panel-head { flex:none; border-radius:0; }
body.plan-fullscreen #ganttWrap { flex:1; min-height:0; max-height:none; border-radius:0; }
body.plan-fullscreen #projectWorkspace > .panel { grid-template-rows:auto minmax(0,1fr); }
/* Each surface has its own stacking context: menus stay above every table column. */
#projectWorkspace > .panel { overflow:visible; }
#projectWorkspace .panel-head { position:relative; z-index:2; background:white; border-radius:14px 14px 0 0; gap:12px; flex-wrap:wrap; }
#ganttWrap { position:relative; isolation:isolate; z-index:1; border-radius:0 0 14px 14px; min-height:0; max-height:var(--plan-available-height,calc(100dvh - 310px)); overflow-x:scroll; }
#ganttWrap::-webkit-scrollbar { width:14px; height:14px; }
#ganttWrap::-webkit-scrollbar-track { background:#f0edf0; }
#ganttWrap::-webkit-scrollbar-thumb { background:#aaa1aa; border:3px solid #f0edf0; border-radius:8px; }
#ganttWrap { scrollbar-color:#aaa1aa #f0edf0; scrollbar-width:auto; }
.task-row,.bar-row { height:var(--row-height); }
.timeline { background-image:repeating-linear-gradient(to right,transparent 0,transparent calc(var(--day) - 1px),var(--line) calc(var(--day) - 1px),var(--line) var(--day)),repeating-linear-gradient(to bottom,transparent 0,transparent calc(var(--row-height) - 1px),var(--line) calc(var(--row-height) - 1px),var(--line) var(--row-height)); }
.bar,.bar.type-epic,.bar.type-task,.bar.type-subtask { top:calc((var(--row-height) - 24px)/2); }
.bar.milestone { top:calc((var(--row-height) - 18px)/2); }
.epic-name,.epic-track { height:var(--row-height); }
.epic-name { padding-top:calc((var(--row-height) - 20px)/2); padding-bottom:0; }
.epic-summary-bar { top:calc((var(--row-height) - 24px)/2); }
.projects-heading { display:flex; align-items:center; }
.projects-heading .nav { min-width:0; }
.projects-heading #toggleProjects { flex:none; width:22px; padding:0; font-size:15px; }
.projects-heading #projectsNav { padding-left:4px; }
#toggleProjects,#settingsButton { background:transparent; border:0; color:#fff; padding:6px; font-size:22px; }
.owner-group summary { color:#f5d9e1; padding:10px 0; cursor:pointer; overflow-wrap:anywhere; }
.owner-group .project-link { padding-left:18px; }
.sidebar-bottom { position:relative; }
#settingsMenu { position:absolute; bottom:calc(100% + 10px); left:0; width:250px; max-width:calc(100vw - 24px); padding:8px; background:white; color:var(--text); border:1px solid var(--line); border-radius:10px; box-shadow:0 12px 35px #17203340; z-index:70; }
#settingsMenu button { display:block; width:100%; text-align:left; border:0; }
#settingsMenu label { padding:10px; margin:0; }
#settingsMenu .hidden { display:none; }
.sidebar-bottom #settingsMenu:not(.hidden) { display:block; }
#rowScale { width:100%; padding:0; accent-color:var(--primary); }
.sidebar { z-index:5; }
.user-controls { flex-wrap:wrap; }
.user-role { max-width:160px; font-size:11px; padding:6px; }
.audit-section { margin-top:24px; border-top:1px solid var(--line); padding-top:16px; }
#auditList { max-height:350px; overflow:auto; margin:12px 0; }
.audit-entry { padding:12px; border-bottom:1px solid var(--line); }
.audit-entry small,.audit-entry b { display:block; margin-bottom:6px; }
.audit-entry pre { white-space:pre-wrap; overflow-wrap:anywhere; font-size:11px; }
@media(max-width:600px) { .sidebar-bottom { display:flex; } .sidebar { max-height:none; } #settingsMenu { bottom:auto; top:100%; } }

.plan-date-popup { position:fixed; inset:auto; margin:0; box-sizing:border-box; padding:6px; border:1px solid #d8dce6; border-radius:8px; background:white; color:#172033; overflow:auto; box-shadow:0 8px 25px #17203330; }
.plan-date-popup button { display:block; width:100%; text-align:left; border:0; }
.plan-date-popup label { display:flex; flex-direction:row; flex-wrap:nowrap; justify-content:flex-start; align-items:center; gap:3mm; margin:0; padding:7px; cursor:pointer; }
.plan-date-popup input { width:auto; margin:0; flex-shrink:0; }
.plan-date-popup .active,.plan-date-popup label:hover { background:#f9edf1; color:#931533; }
#startMonthFilter,#endMonthFilter { width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; padding:4px; font-size:11px; text-align:left; }
#startMonthFilter.active,#endMonthFilter.active { background:#f9edf1; color:#931533; }
.people-popup { box-sizing:border-box; }
