/* Shared Tasks control finish, after component styles. */
body[data-kpulse-module=tasks] .tasks-history-tools{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 16px;border-bottom:1px solid var(--work-line)}
body[data-kpulse-module=tasks] .tasks-history-tools button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:42px;padding:9px 13px;border:1px solid var(--work-line);border-radius:11px;background:var(--work-surface);color:var(--work-ink);font-size:13px;font-weight:650;cursor:pointer}
.tasks-history-tools .task-icon{width:17px;height:17px;color:var(--work-accent)}
body[data-kpulse-module=tasks] .tasks-export-desktop{background:var(--work-soft)}
.tasks-export-actions{margin-left:auto;position:relative}
.tasks-export-mobile{display:none}
.tasks-archive-scope{display:grid;flex:1 1 200px;max-width:320px;gap:4px;font-size:12px;color:var(--work-muted)}
body[data-kpulse-module=tasks] .tasks-archive-scope select{min-height:42px;width:100%;padding:9px 34px 9px 12px;border:1px solid var(--work-line);border-radius:11px;background:var(--work-surface);color:var(--work-ink);font:inherit;font-size:14px}
.tasks-history-tools [hidden],.tasks-archive-scope[hidden],#tasksViewToggle[hidden]{display:none!important}
.tasks-export-selection{border:1px solid var(--work-line);border-radius:12px;padding:10px 12px;background:var(--work-soft)}
.tasks-export-selection summary{cursor:pointer;font-weight:650;font-size:14px}
.tasks-export-selection dl{margin:12px 0 0}
.tasks-export-selection dd{margin-bottom:0!important}
@media(max-width:600px){
 body[data-kpulse-module=tasks] .tasks-history-tools{padding:8px 10px}
 body[data-kpulse-module=tasks] .tasks-history-tools .tasks-export-desktop{display:none}
 .tasks-export-mobile{display:block}
 .tasks-export-mobile>summary{display:grid;place-items:center;width:44px;height:42px;box-sizing:border-box;list-style:none;border:1px solid var(--work-line);border-radius:11px;color:var(--work-ink);background:var(--work-surface);font-size:26px;font-weight:700;cursor:pointer}
 .tasks-export-mobile>summary::-webkit-details-marker{display:none}
 .tasks-export-mobile>div{position:absolute;right:0;top:calc(100% + 6px);z-index:25;padding:6px;min-width:185px;border:1px solid var(--work-line);border-radius:13px;background:var(--work-surface);box-shadow:0 10px 28px #08172b25}
 .tasks-export-mobile button{width:100%;white-space:nowrap}
 .tasks-archive-scope{width:auto;max-width:none;flex:1 1 180px}
}
:is(.tasks-history-tools button,.tasks-export-mobile summary,.tasks-archive-scope select):focus-visible{outline:2px solid var(--work-accent);outline-offset:3px}

body[data-kpulse-module=tasks] button.task-command,body[data-kpulse-module=tasks] button.task-take-work,#taskForm #taskReadSummary button.task-command{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:42px;width:auto;padding:10px 14px;border:1px solid #6545ce;border-radius:10px;background:#6545ce;color:#fff;font:inherit;font-size:14px;font-weight:700;line-height:1.35;box-shadow:0 3px 9px #48338b20}
body[data-kpulse-module=tasks] button.task-command[data-task-command=done],#taskForm #taskReadSummary button.task-command[data-task-command=done]{border-color:#a3ccbf;background:#edf7f3;color:#205749;box-shadow:none}
body[data-tasks-theme=dark] button.task-command[data-task-command=done],body[data-tasks-theme=dark] #taskForm #taskReadSummary button.task-command[data-task-command=done]{border-color:#4b8677;background:#173d34;color:#d5f3e7}
body[data-kpulse-module=tasks] .kanban-move{display:flex;flex-wrap:wrap;gap:8px;padding-top:12px;border-color:var(--work-line)}
body[data-kpulse-module=tasks] .kanban-move>button.task-command{flex:1 1 145px;min-width:0;white-space:normal;font-size:14px}
.kanban-move>button.task-command>.task-icon{width:18px;height:18px;flex:none}
body[data-kpulse-module=tasks] :is(button.task-command,button.task-take-work):hover:not(:disabled){filter:brightness(1.04);box-shadow:0 5px 12px #48338b25;transform:translateY(-1px)}
body[data-kpulse-module=tasks] :is(button.task-command,button.task-take-work):active:not(:disabled){transform:translateY(1px) scale(.98)}

.settings-profile-identity{display:flex;align-items:center;gap:12px;margin-bottom:15px;min-width:0}
.settings-profile-identity strong{overflow-wrap:anywhere;font-size:16px;color:var(--work-ink)}
.settings-profile-avatar{display:grid;place-items:center;width:52px;height:52px;flex:none;border:1px solid var(--work-line);border-radius:16px;color:var(--work-accent);background:var(--work-accent-soft);font-size:20px;font-weight:750;overflow:hidden}
.settings-profile-avatar img{width:100%;height:100%;object-fit:cover}
.settings-profile-edit,#tasksSoundPreview{display:inline-flex;align-items:center;gap:8px}
.settings-profile-edit .task-icon,#tasksSoundPreview .task-icon{width:18px;height:18px}
#tasksSoundFeedback:empty{display:none}

body[data-kpulse-module=tasks] .tasks-main .product-member{display:flex;flex-direction:column;align-items:stretch;gap:12px;min-width:0;padding:16px}
.product-member-identity{display:flex;align-items:flex-start;gap:12px;min-width:0}
.product-member-identity>.product-avatar{flex:0 0 43px;width:43px;height:43px}
.product-member-identity>div{min-width:0;flex:1}
.product-member-identity h2{margin:0 0 6px;overflow-wrap:anywhere;line-height:1.4}
.product-member-footer{display:flex;align-items:center;justify-content:space-between;gap:9px;flex-wrap:wrap;min-width:0;padding-top:11px;border-top:1px solid var(--work-line)}
.product-member-footer .member-access-label{display:inline-flex;align-items:center;gap:6px;min-width:0;white-space:normal;font-size:13px!important;line-height:1.4!important}
.product-member-footer .team-member-edit{grid-column:auto;margin:0;min-width:0;max-width:100%;white-space:normal;font-size:13px!important}
.product-member-footer .product-member-dot{flex:none}
.product-member-positions{display:flex;flex-wrap:wrap;gap:5px;margin-top:6px}
.product-member-positions>span{font-size:13px;line-height:1.4;padding:3px 7px;border-radius:7px;color:var(--work-muted);background:var(--work-soft);overflow-wrap:anywhere}

.team-governance{margin-top:12px;border:1px solid var(--work-line);border-radius:12px;background:var(--work-surface);overflow:hidden}
.team-governance>summary{display:flex;align-items:center;gap:8px;padding:12px;list-style:none;cursor:pointer;font-size:14px;font-weight:700;color:var(--work-ink)}
.team-governance>summary::-webkit-details-marker{display:none}
.team-governance>summary>.task-icon{width:18px;height:18px;color:var(--work-accent)}
.team-governance>summary>.task-icon:last-child{margin-left:auto;transition:transform .2s}
.team-governance[open]>summary>.task-icon:last-child{transform:rotate(180deg)}
.team-governance>form{padding:0 12px 12px}
.team-member-editor{grid-column:1/-1;min-width:0}
.team-editor-search{display:grid;gap:6px;font-size:14px;font-weight:650;color:var(--work-ink)}
.team-editor-search>input{box-sizing:border-box;min-width:0;width:100%;min-height:42px;padding:10px 12px;border:1px solid var(--work-line);border-radius:10px;color:var(--work-ink);background:var(--work-surface);font:inherit;font-size:14px}
.team-member-editor .team-editor-help{font-size:13px!important;line-height:1.5!important;color:var(--work-muted);margin:8px 0}
.team-editor-count,.team-editor-search-result{font-size:13px!important;margin:8px 0!important;color:var(--work-muted)}
.team-editor-search-result:empty{display:none}
.team-person-list{border-top:1px solid var(--work-line)}
.team-person-row{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:7px;align-items:center;padding:10px 0;border-bottom:1px solid var(--work-line);min-width:0}
.team-person-name{font-size:14px;font-weight:650;line-height:1.45;color:var(--work-ink);overflow-wrap:anywhere}
.team-person-row>.team-person-choice{display:flex;align-items:center;gap:5px;padding:7px;border:1px solid var(--work-line);border-radius:8px;background:var(--work-surface);color:var(--work-muted);font-size:13px;cursor:pointer;min-width:0}
.team-person-choice:has(input:checked){background:var(--work-accent-soft);border-color:var(--work-accent);color:var(--work-ink)}
.team-person-choice>input[type=checkbox]{width:16px;height:16px;min-height:16px;flex:none;accent-color:#6545ce;margin:0}
.team-editor-departments>summary{display:flex;align-items:center;gap:8px;min-height:42px;padding:8px 0;font-size:14px;font-weight:650;color:var(--work-ink);cursor:pointer}
.team-editor-departments>summary>span{border-radius:7px;background:var(--work-soft);color:var(--work-muted);padding:2px 6px;font-size:12px}
.team-person-row[hidden],.team-editor-departments[hidden]{display:none}
.team-governance form>[type=submit]{margin-top:12px;max-width:100%;font-size:14px}
:is(.archive-select select,.team-editor-search input,.team-governance summary,.tasks-report-menu summary):focus-visible{outline:2px solid var(--work-accent);outline-offset:2px}
@media(max-width:620px){.team-person-row{grid-template-columns:1fr 1fr}.team-person-name{grid-column:1/-1}.team-person-row>.team-person-choice{justify-content:center}.tasks-report-menu{margin-inline:10px!important}.tasks-archive-tools>label{max-width:none!important}.tasks-archive-tools>button{flex:1 1 150px}}
@media(prefers-reduced-motion:reduce){.archive-menu-chevron,.team-governance>summary>.task-icon:last-child{transition:none}}

.team-position-chip{display:inline-flex;flex-wrap:wrap;gap:4px 7px;align-items:center;max-width:100%;border-radius:9px;padding:5px 9px;background:var(--tasks-control-tint,rgba(111,77,205,.09));font-size:13px;line-height:1.4;overflow-wrap:anywhere}
.team-position-chip>span{opacity:.8}
.product-member-positions:empty{display:none}
#teamPositionDialog{width:min(520px,calc(100vw - 24px))}
#teamPositionMember{font-size:17px}

body[data-tasks-theme=dark] .kanban-column>header>b{background:#49365e;color:#f5eeff;min-width:30px;text-align:center;padding:4px 8px;font-size:14px;line-height:1.4}
body[data-tasks-theme=dark] .kanban-column.in_progress>header>b{background:#234d76;color:#eaf5ff}
body[data-tasks-theme=dark] .kanban-column.review>header>b{background:#654720;color:#fff4de}
body[data-tasks-theme=dark] .kanban-column.done>header>b{background:#205743;color:#e2fff1}
body[data-kpulse-module=tasks] .tasks-toolbar-actions{flex-wrap:wrap}
body[data-kpulse-module=tasks] .tasks-toolbar-actions .tasks-filter:has(#taskProjectFilter){flex:1 1 285px;min-width:0}
body[data-kpulse-module=tasks] #taskProjectFilter{width:100%;min-width:285px;max-width:430px;padding-right:28px}
@media(max-width:760px){body[data-kpulse-module=tasks] .tasks-toolbar-actions .tasks-filter:has(#taskProjectFilter){flex-basis:100%}body[data-kpulse-module=tasks] #taskProjectFilter{min-width:0;max-width:none}}

body[data-kpulse-module=tasks] .product-archive-confirm{padding:14px;border:1px solid #d7b7a5;border-radius:12px;background:#fff7ee;color:#664525}
body[data-kpulse-module=tasks] .product-archive-confirm p{margin:0 0 12px;color:#664525;font-size:14px;line-height:1.55}
body[data-tasks-theme=dark] .product-archive-confirm{background:#332c25;border-color:#967450;color:#fff0d9}
body[data-tasks-theme=dark] .product-archive-confirm p{color:#fff0d9}
body[data-tasks-theme=dark] .product-archive-confirm .tasks-danger{background:#4a262b;border-color:#bb747d;color:#ffe6e9}
body[data-tasks-theme=dark] .product-archive-confirm .tasks-secondary{background:#243047;border-color:#71829b;color:#f4f7ff}

/* The project title button owns the card hit area; secondary actions remain independent. */
.product-project-card{position:relative;cursor:pointer}
.product-project-card .project-open{position:static}
.product-project-card .project-open::after{content:"";position:absolute;inset:0;border-radius:inherit}
.product-project-card :is(.product-project-actions button,.project-first-task){position:relative;z-index:1}
.product-project-card:has(.project-open:focus-visible){outline:2px solid var(--work-accent);outline-offset:3px}

.team-group:has(.team-governance[open]){grid-column:1/-1}
.team-member-editor{container-type:inline-size}
@container(max-width:410px){.team-person-row{grid-template-columns:1fr 1fr}.team-person-name{grid-column:1/-1}.team-person-row>.team-person-choice{justify-content:center}}
body[data-kpulse-module=tasks] .kpulse-inbox>header{background:var(--work-surface);border-color:var(--work-line);padding:18px 20px}
body[data-kpulse-module=tasks] .kpulse-inbox>header h2{color:var(--work-ink)}
body[data-kpulse-module=tasks] .kpulse-inbox>header small{color:var(--work-accent);font-size:12px}
body[data-kpulse-module=tasks] .kpulse-inbox-item{background:var(--work-surface);border-color:var(--work-line);color:var(--work-ink);font-size:14px}
body[data-kpulse-module=tasks] .kpulse-inbox-item.is-unread{background:var(--work-soft);border-color:var(--work-accent)}
body[data-kpulse-module=tasks] .kpulse-inbox-item b{color:var(--work-ink);font-size:14px}
body[data-kpulse-module=tasks] .kpulse-inbox-item small,body[data-kpulse-module=tasks] .kpulse-inbox footer{color:var(--work-muted);font-size:12px}

@media(max-width:760px){body[data-kpulse-module=tasks] .tasks-filter-bar{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:9px}body[data-kpulse-module=tasks] .tasks-filter-bar select{padding:7px;font-size:14px}body[data-kpulse-module=tasks] .tasks-filter-bar .task-member-picker{min-width:0}}
