/* Sentrio 0.5 — schedule, Kanban, activity and compact-navigation refinements. */

/* Compact sidebar keeps human-readable labels under icons. */
body.sidebar-compact{--sidebar-width:84px!important}
body.sidebar-compact .sidebar{width:84px!important;padding-left:8px!important;padding-right:8px!important}
body.sidebar-compact .sidebar-brand{justify-content:center!important;padding:0!important}
body.sidebar-compact .sidebar-brand .menu-text,
body.sidebar-compact .workspace-label,
body.sidebar-compact .nav-heading,
body.sidebar-compact .sidebar-bottom .profile-name,
body.sidebar-compact .sidebar-bottom .version{display:none!important}
body.sidebar-compact .sidebar nav .nav-link{height:auto!important;min-height:58px!important;padding:8px 3px!important;display:flex!important;flex-direction:column!important;justify-content:center!important;gap:4px!important;white-space:normal!important;text-align:center!important;line-height:1.05!important}
body.sidebar-compact .sidebar nav .nav-link>.icon{width:20px!important;height:20px!important;margin:0 auto!important}
body.sidebar-compact .sidebar nav .nav-link>.menu-text{display:block!important;width:100%!important;max-width:70px!important;font-size:9px!important;font-weight:550!important;letter-spacing:-.08px!important;color:inherit!important;overflow-wrap:anywhere!important}
body.sidebar-compact .sidebar nav .nav-link.selected:after{right:5px!important;top:8px!important}
body.sidebar-compact .sidebar-bottom .profile{justify-content:center!important;padding:10px 0!important}
body.sidebar-compact .sidebar-bottom .profile>.icon{display:none!important}
body.sidebar-compact .sidebar-bottom .logout{width:100%!important;display:flex!important;flex-direction:column!important;gap:4px!important;align-items:center!important;padding:8px 2px!important}
body.sidebar-compact .sidebar-bottom .logout>.menu-text{display:block!important;font-size:9px!important;line-height:1.05!important;text-align:center!important}
body.sidebar-compact .sidebar-footer{justify-content:center!important}

/* Schedule — make today unmistakable without overwhelming the table. */
.people-schedule th.today-col{background:color-mix(in srgb,var(--accent) 16%,#fff)!important;color:var(--accent)!important;box-shadow:inset 2px 0 color-mix(in srgb,var(--accent) 50%,transparent),inset -2px 0 color-mix(in srgb,var(--accent) 50%,transparent)}
.people-schedule td.today-col{background:color-mix(in srgb,var(--accent) 7%,#fff)!important;box-shadow:inset 2px 0 color-mix(in srgb,var(--accent) 34%,transparent),inset -2px 0 color-mix(in srgb,var(--accent) 34%,transparent)}
.people-schedule tbody tr:hover td.today-col{background:color-mix(in srgb,var(--accent) 11%,#fff)!important}
.schedule-readonly-note{margin:7px 0 0;padding:7px 10px;border-radius:8px;background:#f1effd;color:#5a4bc8;font-size:12px;font-weight:600}
#schedule-day-modal.is-readonly [data-schedule-save],#schedule-day-modal.is-readonly [data-schedule-delete]{display:none!important}
#schedule-day-modal.is-readonly input,#schedule-day-modal.is-readonly select,#schedule-day-modal.is-readonly textarea{pointer-events:none;background:#f6f7fa}
[data-theme=dark] .people-schedule th.today-col{background:color-mix(in srgb,var(--accent) 28%,#20283a)!important;color:#dcd7ff!important}
[data-theme=dark] .people-schedule td.today-col{background:color-mix(in srgb,var(--accent) 15%,#181f2d)!important}
[data-theme=dark] .schedule-readonly-note{background:#332e55;color:#d5ceff}

/* Home profile avatar is intentionally more prominent. */
.welcome-panel .hero-profile .avatar.large{width:86px!important;height:86px!important;font-size:28px!important;box-shadow:0 10px 28px #27326a22}
.welcome-panel .hero-profile .avatar.large img{width:100%;height:100%;object-fit:cover;border-radius:inherit}

/* User work-time metrics. */
.v050-profile-metrics{display:flex;flex-direction:column;gap:8px}
.work-time-metrics{display:grid;grid-template-columns:1fr;gap:8px;margin:14px 0 6px}
.work-time-metrics>div{display:flex;align-items:center;justify-content:space-between;gap:12px;border:1px solid var(--border);border-radius:10px;padding:10px 12px;background:color-mix(in srgb,var(--accent) 4%,#fff)}
.work-time-metrics small{margin:0}.work-time-metrics b{font-size:13px;white-space:nowrap}.work-time-note{line-height:1.45!important}
[data-theme=dark] .work-time-metrics>div{background:#20283a}

/* Shared label colours are always visible. */
.task-card-labels span,.task-label-choice[class*="task-label-id-"]>span,.label-preview[class*="task-label-id-"]{background:var(--task-label-color,#6355df)!important;color:#fff!important;border:1px solid color-mix(in srgb,var(--task-label-color,#6355df) 74%,#000)!important;box-shadow:0 1px 2px #0001}
.task-label-choice{position:relative}
.task-label-choice input{position:absolute;opacity:0;pointer-events:none}
.task-label-choice>span{display:inline-flex;align-items:center;min-height:30px;padding:5px 10px;border-radius:8px;border:1px solid var(--border);cursor:pointer;font-size:12px;font-weight:650;transition:transform .15s,box-shadow .15s,outline-color .15s}
.task-label-choice input:checked+span{outline:3px solid color-mix(in srgb,var(--task-label-color,var(--accent)) 25%,transparent);outline-offset:2px;transform:translateY(-1px)}
.task-label-choice.no-label>span{background:#f4f5f8;color:#657086}
.task-label-choice.no-label input:checked+span{outline:3px solid #a9afbb35}
.label-preview{display:inline-flex;align-items:center;padding:5px 9px;border-radius:8px;font-size:12px;font-weight:650;white-space:nowrap}

/* List menu separates safe and destructive operations. */
.list-menu-card{min-width:220px!important}
.list-menu-section{display:flex;flex-direction:column;align-items:stretch;gap:5px;padding:8px 10px}
.list-menu-section+ .list-menu-section{border-top:1px solid var(--border)}
.list-menu-section>strong{font-size:11px;color:var(--muted);text-transform:uppercase;letter-spacing:.06em;margin-bottom:2px}
.list-menu-section .text-button{text-align:left;width:100%}
.list-menu-section form{display:flex;flex-direction:column;gap:6px}
.list-menu-section input{min-height:34px!important;padding:6px 8px!important}
.list-menu-section.danger-zone{background:#fffafa}
[data-theme=dark] .list-menu-section.danger-zone{background:#2c2025}

/* v0.5 task modal keeps header/footer fixed and columns independently scrollable. */
.v050-task-modal{width:min(1180px,calc(100vw - 34px));height:min(860px,calc(100vh - 42px));max-height:none!important;overflow:hidden!important;display:flex;flex-direction:column}
.v050-task-modal>.s-modal-head,.v050-task-modal>.s-modal-foot,.v050-task-modal>form>.s-modal-foot{flex:0 0 auto}
.v050-task-modal>form{display:flex;flex:1;min-height:0;flex-direction:column}
.v050-task-modal .task-modal-scroll{flex:1;min-height:0;overflow:hidden}
.v050-task-modal .task-form-grid{height:100%;min-height:0;display:grid;grid-template-columns:minmax(0,1.65fr) minmax(310px,.75fr);gap:0}
.v050-task-modal .task-main-fields{min-width:0;overflow:auto;padding:22px;display:flex;flex-direction:column;gap:16px}
.v050-task-modal .task-side{min-width:0;overflow:auto;padding:22px;background:var(--task-side-bg);border-left:1px solid var(--s-border)}
.v050-task-modal .task-side section+section{margin-top:26px}
.v050-task-modal .task-modal-actions{justify-content:space-between}
.v050-task-modal .task-modal-actions>div{display:flex;gap:8px}

/* Task modal title is the only title editor after task creation. */
.task-modal-sticky-head{position:sticky;top:0;z-index:5;background:inherit}
.task-heading-copy{min-width:0;flex:1}
.task-title-editor{min-width:0}
.task-title-editor h2{margin:0;cursor:text;max-width:720px;overflow-wrap:anywhere}
.task-title-editor h2:hover{text-decoration:underline;text-decoration-style:dotted;text-underline-offset:4px}
.task-title-editor input{font-size:20px!important;font-weight:650!important;letter-spacing:-.35px!important;line-height:1.25!important;min-height:40px!important;padding:4px 8px!important;max-width:760px;border-color:transparent!important;background:transparent!important}
.task-title-editor input:focus{background:var(--v10-surface,#fff)!important;border-color:#9a8df0!important}
.task-lock-state{display:inline-flex;margin-top:7px;padding:4px 8px;border-radius:999px;background:#ecf7f0;color:#287053;font-size:11px;font-weight:650}
.task-lock-state.expiring{background:#fff5df;color:#8a5b12}
.task-lock-state.error{background:#fff0f0;color:#a33642}

/* Compact growing description and comment composer. */
[data-task-description],[data-comment-input]{resize:none!important;overflow-y:auto;transition:height .14s ease;line-height:1.5!important}
[data-task-description]{min-height:38px!important;height:38px;padding:8px 10px!important}
.comment-composer{align-items:flex-start!important}
.comment-composer>div{flex:1;min-width:0}
.comment-composer [data-comment-input]{min-height:36px!important;height:36px!important;padding:7px 10px!important}
.comment-composer .comment-avatar,.composer-avatar{width:34px!important;height:34px!important;min-width:34px!important;border-radius:50%;display:grid!important;place-items:center!important;background:#6355df!important;color:#fff!important;font-weight:700!important;overflow:hidden!important;border:2px solid color-mix(in srgb,var(--accent) 18%,#fff)!important}
.comment-composer .comment-avatar img,.task-comment .comment-avatar img{width:100%;height:100%;object-fit:cover;border-radius:inherit}
.task-comments{display:flex!important;flex-direction:column!important;gap:10px!important}

/* Checklist: animated progress, full wrapping, quick-entry focus. */
.checklist-heading-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap;justify-content:flex-end}
.overall-check-progress{display:flex;align-items:center;gap:7px;min-width:145px}
.overall-check-progress small{margin:0;white-space:nowrap}
.task-progress-track{height:7px;flex:1;min-width:70px;border-radius:999px;background:#e5e8ef;overflow:hidden;position:relative}
.task-progress-track>i{display:block;height:100%;width:0;border-radius:inherit;background:var(--accent);transition:width .32s cubic-bezier(.2,.75,.25,1)}
.checklist-progress-wrap{display:flex;align-items:center;gap:8px;min-width:150px}
.checklist-progress-wrap small{margin:0;white-space:nowrap}
.checklist-item textarea{resize:none!important;min-height:36px!important;height:36px;padding:7px 9px!important;line-height:1.45!important;overflow-y:hidden}
.checklist-item.done textarea{text-decoration:line-through;color:var(--muted)}
.task-card-check-progress{display:flex;align-items:center;gap:8px;margin-top:9px}
.task-card-check-progress .task-progress-track{height:5px}
.task-card-check-progress small{margin:0;font-size:10px;white-space:nowrap}
[data-theme=dark] .task-progress-track{background:#353d4d}

/* Completed card always reserves space for the completion control. */
.task-card.completed .task-card-open{padding-left:38px!important}
.task-card.completed .task-complete-dot{opacity:1!important;visibility:visible!important;transform:scale(1)!important}
.task-card.completed [data-card-title]{text-decoration:line-through;color:var(--muted)}

/* Automation modal. */
.automation-card{max-width:720px!important}
.automation-rule{border:1px solid var(--border);border-radius:13px;padding:18px;background:color-mix(in srgb,var(--accent) 2%,#fff)}
.automation-rule-head{display:flex;align-items:flex-start;justify-content:space-between;gap:22px;margin-bottom:14px}
.automation-rule h3{margin-bottom:4px}.automation-rule p{margin:0;color:var(--muted);font-size:12px}
.automation-rule .switch{display:block!important;position:relative;flex:0 0 auto;width:46px!important;height:26px!important;appearance:none!important;background:transparent!important;border-radius:999px}
.automation-rule .switch:before{display:none!important}
.automation-rule .switch input{position:absolute;opacity:0}.automation-rule .switch span{position:absolute;inset:0;border-radius:999px;background:#c8ced9;cursor:pointer;transition:background .18s}.automation-rule .switch span:after{content:'';position:absolute;width:20px;height:20px;left:3px;top:3px;border-radius:50%;background:#fff;box-shadow:0 2px 6px #0002;transition:transform .18s}.automation-rule .switch input:checked+span{background:var(--accent)}.automation-rule .switch input:checked+span:after{transform:translateX(20px)}
.automation-save-state{font-size:12px;color:var(--muted);min-height:18px}.automation-save-state.saving{color:#8a5b12}.automation-save-state.saved{color:#287053}.automation-save-state.error{color:#a33642}
[data-theme=dark] .automation-rule{background:#20283a}

/* Full-screen Kanban workspace. */
body.kanban-fullscreen{overflow:hidden!important}
body.kanban-fullscreen .sidebar,body.kanban-fullscreen .sidebar-backdrop,body.kanban-fullscreen .topbar{display:none!important}
body.kanban-fullscreen .main{margin-left:0!important;width:100vw!important;max-width:none!important;height:100dvh!important}
body.kanban-fullscreen .content{max-width:none!important;width:100%!important;height:100dvh!important;padding:12px!important;display:flex!important;flex-direction:column!important;overflow:hidden!important}
body.kanban-fullscreen .kanban-page{height:100%!important;min-height:0!important;display:flex!important;flex-direction:column!important}
body.kanban-fullscreen .tasks-heading{margin-bottom:8px!important;flex:0 0 auto}
body.kanban-fullscreen .tasks-heading>div:first-child .eyebrow,body.kanban-fullscreen .tasks-heading>div:first-child p.muted{display:none!important}
body.kanban-fullscreen .tasks-heading h1{font-size:20px!important;margin:0!important}
body.kanban-fullscreen .kanban-toolbar{margin-bottom:8px!important;flex:0 0 auto}
body.kanban-fullscreen .kanban-shell{flex:1!important;min-height:0!important;height:auto!important;max-height:none!important}
body.kanban-fullscreen [data-kanban-fullscreen]{position:relative}

/* Task lock conflict. */
#task-lock-modal .s-modal-card{border-top:4px solid #d39b34}
#task-lock-modal [data-force-unlock]{margin-left:auto}

@media(max-width:760px){
 body.sidebar-compact{--sidebar-width:264px!important}
 body.sidebar-compact .sidebar{width:264px!important}
 .v050-task-modal{width:min(100vw - 16px,1180px);height:calc(100dvh - 16px)}
 .v050-task-modal .task-form-grid{grid-template-columns:1fr;overflow:auto}
 .v050-task-modal .task-main-fields,.v050-task-modal .task-side{overflow:visible}
 .v050-task-modal .task-side{border-left:0;border-top:1px solid var(--s-border)}
 .welcome-panel .hero-profile .avatar.large{width:70px!important;height:70px!important}
 .automation-rule-head{gap:12px}
 .checklist-heading-actions{width:100%;justify-content:flex-start}
}

/* Server-rendered progress bars respect style-src self. */
.task-progress-track>i.progress-0{width:0%}
.task-progress-track>i.progress-1{width:1%}
.task-progress-track>i.progress-2{width:2%}
.task-progress-track>i.progress-3{width:3%}
.task-progress-track>i.progress-4{width:4%}
.task-progress-track>i.progress-5{width:5%}
.task-progress-track>i.progress-6{width:6%}
.task-progress-track>i.progress-7{width:7%}
.task-progress-track>i.progress-8{width:8%}
.task-progress-track>i.progress-9{width:9%}
.task-progress-track>i.progress-10{width:10%}
.task-progress-track>i.progress-11{width:11%}
.task-progress-track>i.progress-12{width:12%}
.task-progress-track>i.progress-13{width:13%}
.task-progress-track>i.progress-14{width:14%}
.task-progress-track>i.progress-15{width:15%}
.task-progress-track>i.progress-16{width:16%}
.task-progress-track>i.progress-17{width:17%}
.task-progress-track>i.progress-18{width:18%}
.task-progress-track>i.progress-19{width:19%}
.task-progress-track>i.progress-20{width:20%}
.task-progress-track>i.progress-21{width:21%}
.task-progress-track>i.progress-22{width:22%}
.task-progress-track>i.progress-23{width:23%}
.task-progress-track>i.progress-24{width:24%}
.task-progress-track>i.progress-25{width:25%}
.task-progress-track>i.progress-26{width:26%}
.task-progress-track>i.progress-27{width:27%}
.task-progress-track>i.progress-28{width:28%}
.task-progress-track>i.progress-29{width:29%}
.task-progress-track>i.progress-30{width:30%}
.task-progress-track>i.progress-31{width:31%}
.task-progress-track>i.progress-32{width:32%}
.task-progress-track>i.progress-33{width:33%}
.task-progress-track>i.progress-34{width:34%}
.task-progress-track>i.progress-35{width:35%}
.task-progress-track>i.progress-36{width:36%}
.task-progress-track>i.progress-37{width:37%}
.task-progress-track>i.progress-38{width:38%}
.task-progress-track>i.progress-39{width:39%}
.task-progress-track>i.progress-40{width:40%}
.task-progress-track>i.progress-41{width:41%}
.task-progress-track>i.progress-42{width:42%}
.task-progress-track>i.progress-43{width:43%}
.task-progress-track>i.progress-44{width:44%}
.task-progress-track>i.progress-45{width:45%}
.task-progress-track>i.progress-46{width:46%}
.task-progress-track>i.progress-47{width:47%}
.task-progress-track>i.progress-48{width:48%}
.task-progress-track>i.progress-49{width:49%}
.task-progress-track>i.progress-50{width:50%}
.task-progress-track>i.progress-51{width:51%}
.task-progress-track>i.progress-52{width:52%}
.task-progress-track>i.progress-53{width:53%}
.task-progress-track>i.progress-54{width:54%}
.task-progress-track>i.progress-55{width:55%}
.task-progress-track>i.progress-56{width:56%}
.task-progress-track>i.progress-57{width:57%}
.task-progress-track>i.progress-58{width:58%}
.task-progress-track>i.progress-59{width:59%}
.task-progress-track>i.progress-60{width:60%}
.task-progress-track>i.progress-61{width:61%}
.task-progress-track>i.progress-62{width:62%}
.task-progress-track>i.progress-63{width:63%}
.task-progress-track>i.progress-64{width:64%}
.task-progress-track>i.progress-65{width:65%}
.task-progress-track>i.progress-66{width:66%}
.task-progress-track>i.progress-67{width:67%}
.task-progress-track>i.progress-68{width:68%}
.task-progress-track>i.progress-69{width:69%}
.task-progress-track>i.progress-70{width:70%}
.task-progress-track>i.progress-71{width:71%}
.task-progress-track>i.progress-72{width:72%}
.task-progress-track>i.progress-73{width:73%}
.task-progress-track>i.progress-74{width:74%}
.task-progress-track>i.progress-75{width:75%}
.task-progress-track>i.progress-76{width:76%}
.task-progress-track>i.progress-77{width:77%}
.task-progress-track>i.progress-78{width:78%}
.task-progress-track>i.progress-79{width:79%}
.task-progress-track>i.progress-80{width:80%}
.task-progress-track>i.progress-81{width:81%}
.task-progress-track>i.progress-82{width:82%}
.task-progress-track>i.progress-83{width:83%}
.task-progress-track>i.progress-84{width:84%}
.task-progress-track>i.progress-85{width:85%}
.task-progress-track>i.progress-86{width:86%}
.task-progress-track>i.progress-87{width:87%}
.task-progress-track>i.progress-88{width:88%}
.task-progress-track>i.progress-89{width:89%}
.task-progress-track>i.progress-90{width:90%}
.task-progress-track>i.progress-91{width:91%}
.task-progress-track>i.progress-92{width:92%}
.task-progress-track>i.progress-93{width:93%}
.task-progress-track>i.progress-94{width:94%}
.task-progress-track>i.progress-95{width:95%}
.task-progress-track>i.progress-96{width:96%}
.task-progress-track>i.progress-97{width:97%}
.task-progress-track>i.progress-98{width:98%}
.task-progress-track>i.progress-99{width:99%}
.task-progress-track>i.progress-100{width:100%}
