/* ERP-TAREFAS-PASSO5-20260904 */
.task-page-main{width:100%;padding:24px;display:flex;flex-direction:column;gap:20px}
.task-title-card,.task-board-card,.task-kanban-shell{background:#fff;border:1px solid #e2e8f0;border-radius:12px;box-shadow:0 1px 2px rgba(15,23,42,.05)}
.task-title-card,.task-board-card{padding:24px;display:flex;align-items:center;justify-content:space-between;gap:18px}
.task-title-copy h1{font-size:24px;line-height:1.25;font-weight:700;color:#0f172a}
.task-title-copy p,.task-board-copy p{margin-top:4px;font-size:14px;color:#64748b}
.task-title-actions,.task-board-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}
.task-board-select{min-width:230px}
.task-board-copy h2{font-size:18px;font-weight:700;color:#0f172a}
.task-btn{height:40px;padding:0 14px;border-radius:9px;border:1px solid transparent;font-size:13px;font-weight:700;display:inline-flex;align-items:center;justify-content:center;gap:6px;white-space:nowrap;transition:.15s}
.task-btn:disabled{opacity:.5;cursor:not-allowed}
.task-btn-primary{background:var(--erp-primary,#ea580c);color:#fff}
.task-btn-primary:hover:not(:disabled){filter:brightness(.94)}
.task-btn-secondary{background:#fff;border-color:#cbd5e1;color:#334155}
.task-btn-secondary:hover:not(:disabled){background:#f8fafc}
.task-btn-danger{background:#fff;border-color:#fecaca;color:#dc2626}
.task-btn-danger:hover:not(:disabled){background:#fef2f2}
.task-input{width:100%;min-height:40px;border:1px solid #cbd5e1;border-radius:9px;background:#fff;padding:9px 11px;font-size:14px;color:#0f172a;outline:none}
.task-input:focus{border-color:var(--erp-primary,#ea580c);box-shadow:0 0 0 3px color-mix(in srgb,var(--erp-primary,#ea580c) 14%,transparent)}
textarea.task-input{min-height:96px;resize:vertical}
.task-kanban-shell{overflow:hidden;min-height:460px}
.task-status{padding:10px 14px;border-bottom:1px solid #e2e8f0;font-size:12px;color:#64748b;background:#f8fafc}
.task-empty{min-height:430px;display:flex;align-items:center;justify-content:center;flex-direction:column;text-align:center;padding:36px}
.task-empty-icon{width:52px;height:52px;border-radius:16px;display:flex;align-items:center;justify-content:center;background:#f1f5f9;color:#64748b;font-size:24px;margin-bottom:14px}
.task-empty h2{font-size:18px;font-weight:700;color:#0f172a}
.task-empty p{font-size:13px;color:#64748b;margin:6px 0 18px;max-width:420px}
.task-kanban{display:flex;align-items:flex-start;gap:14px;overflow-x:auto;padding:16px;min-height:460px}
.task-column{width:320px;min-width:320px;max-width:320px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:12px;display:flex;flex-direction:column;max-height:calc(100vh - 300px)}
.task-column-head{padding:13px 13px 10px;display:flex;align-items:center;justify-content:space-between;gap:10px}
.task-column-title{display:flex;align-items:center;gap:8px;min-width:0}
.task-column-title strong{font-size:13px;color:#0f172a;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.task-count{min-width:22px;height:22px;padding:0 6px;border-radius:999px;background:#e2e8f0;color:#475569;font-size:11px;font-weight:700;display:inline-flex;align-items:center;justify-content:center}
.task-status-dot{width:8px;height:8px;border-radius:50%;flex:0 0 auto}
.task-status-pendente{background:#94a3b8}
.task-status-em_andamento{background:#f59e0b}
.task-status-finalizada{background:#10b981}
.task-column-menu{border:0;background:transparent;width:30px;height:30px;border-radius:8px;color:#64748b;font-size:20px;line-height:1}
.task-column-menu:hover{background:#e2e8f0;color:#0f172a}
.task-list-body{padding:0 10px 10px;overflow-y:auto;min-height:72px;flex:1}
.task-list-body.task-drag-over{background:color-mix(in srgb,var(--erp-primary,#ea580c) 7%,transparent);border-radius:9px}
.task-card{background:#fff;border:1px solid #e2e8f0;border-radius:10px;padding:12px;margin-bottom:9px;box-shadow:0 1px 2px rgba(15,23,42,.04);cursor:pointer;transition:.15s}
.task-card:hover{border-color:#cbd5e1;box-shadow:0 3px 10px rgba(15,23,42,.07);transform:translateY(-1px)}
.task-card[draggable=true]{cursor:grab}
.task-card.dragging{opacity:.45;transform:rotate(1deg)}
.task-card-title{font-size:13px;font-weight:700;color:#0f172a;line-height:1.35;word-break:break-word}
.task-card-desc{margin-top:7px;color:#64748b;font-size:12px;line-height:1.4;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.task-card-meta{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:11px}
.task-due{font-size:10px;font-weight:700;padding:4px 7px;border-radius:7px;background:#f1f5f9;color:#64748b}
.task-due.overdue{background:#fef2f2;color:#dc2626}
.task-due.today{background:#fff7ed;color:#c2410c}
.task-owner{display:flex;align-items:center;gap:6px;min-width:0}
.task-avatar{width:24px;height:24px;border-radius:50%;background:#e2e8f0;color:#475569;display:flex;align-items:center;justify-content:center;font-size:9px;font-weight:800;flex:0 0 auto}
.task-owner span{font-size:10px;color:#64748b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:120px}
.task-add-card{width:calc(100% - 20px);margin:0 10px 10px;height:36px;border:1px dashed #cbd5e1;border-radius:9px;color:#64748b;font-size:12px;font-weight:700;background:transparent}
.task-add-card:hover{background:#fff;color:var(--erp-primary,#ea580c);border-color:var(--erp-primary,#ea580c)}
.task-modal{position:fixed;inset:0;z-index:10020;background:rgba(15,23,42,.48);display:flex;align-items:center;justify-content:center;padding:18px}
.task-modal-card{width:min(680px,100%);max-height:calc(100vh - 36px);overflow:auto;background:#fff;border:1px solid #e2e8f0;border-radius:16px;box-shadow:0 24px 60px rgba(15,23,42,.22)}
.task-modal-sm{width:min(520px,100%)}
.task-modal-header{padding:18px 20px;border-bottom:1px solid #e2e8f0;display:flex;align-items:flex-start;justify-content:space-between;gap:16px}
.task-modal-header h2{font-size:18px;font-weight:700;color:#0f172a}
.task-modal-header p{font-size:12px;color:#64748b;margin-top:3px}
.task-close{width:34px;height:34px;border-radius:8px;border:1px solid #e2e8f0;background:#fff;color:#64748b;font-size:22px;display:flex;align-items:center;justify-content:center}
.task-close:hover{background:#f8fafc;color:#0f172a}
.task-form{padding:20px;display:flex;flex-direction:column;gap:16px}
.task-form label{font-size:12px;font-weight:700;color:#334155;display:flex;flex-direction:column;gap:6px}
.task-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.task-readonly{border:1px solid #e2e8f0;border-radius:9px;background:#f8fafc;padding:8px 11px;display:flex;flex-direction:column;justify-content:center}
.task-readonly span{font-size:10px;text-transform:uppercase;font-weight:700;color:#94a3b8}
.task-readonly strong{font-size:13px;color:#334155;margin-top:2px}
.task-linked-info{border:1px solid #bae6fd;background:#f0f9ff;color:#0369a1;border-radius:10px;padding:11px 12px;font-size:12px}
.task-linked-info b,.task-linked-info span{display:block}
.task-linked-info span{margin-top:2px}
.task-form-footer{padding-top:4px;display:flex;gap:8px;align-items:center;justify-content:flex-end}
.task-form-footer-between{justify-content:space-between}
.task-footer-right{display:flex;gap:8px;margin-left:auto}
.task-confirm-footer{padding:18px 20px;display:flex;justify-content:flex-end;gap:8px}
.hidden{display:none!important}

/* Corrige o menu compartilhado caso a build de utilitários da página não contenha w-64. */
#erp-user-menu{right:0!important;left:auto!important;width:256px!important;min-width:256px!important;max-width:256px!important}

body.dark .task-title-card,
body.dark .task-board-card,
body.dark .task-kanban-shell,
body.dark .task-modal-card{background:#111;border-color:#262626}
body.dark .task-title-copy h1,
body.dark .task-board-copy h2,
body.dark .task-empty h2,
body.dark .task-column-title strong,
body.dark .task-card-title,
body.dark .task-modal-header h2{color:#fff}
body.dark .task-title-copy p,
body.dark .task-board-copy p,
body.dark .task-empty p,
body.dark .task-modal-header p{color:#a3a3a3}
body.dark .task-column{background:#0a0a0a;border-color:#262626}
body.dark .task-card{background:#151515;border-color:#2a2a2a}
body.dark .task-card-desc,
body.dark .task-owner span{color:#a3a3a3}
body.dark .task-input,
body.dark .task-btn-secondary,
body.dark .task-close{background:#111;border-color:#333;color:#e5e5e5}
body.dark .task-btn-secondary:hover,
body.dark .task-close:hover{background:#1a1a1a}
body.dark .task-readonly{background:#0a0a0a;border-color:#262626}
body.dark .task-readonly strong{color:#e5e5e5}
body.dark .task-status{background:#0a0a0a;border-color:#262626;color:#a3a3a3}
body.dark .task-count{background:#262626;color:#d4d4d4}
body.dark .task-column-menu:hover{background:#262626;color:#fff}

@media(max-width:900px){
  .task-title-card,.task-board-card{align-items:stretch;flex-direction:column}
  .task-title-actions,.task-board-actions{width:100%;justify-content:flex-start}
  .task-board-select{flex:1;min-width:180px}
}
@media(max-width:640px){
  .task-page-main{padding:12px;gap:12px}
  .task-title-card,.task-board-card{padding:16px}
  .task-title-actions{display:grid;grid-template-columns:1fr 1fr}
  .task-board-select{grid-column:1 / -1;min-width:0}
  .task-title-actions .task-btn{width:100%}
  .task-board-actions{display:grid;grid-template-columns:1fr 1fr}
  .task-board-actions .task-btn{width:100%}
  .task-kanban{padding:12px;gap:10px}
  .task-column{width:286px;min-width:286px;max-width:286px;max-height:none}
  .task-card[draggable=true]{cursor:pointer}
  .task-form-grid{grid-template-columns:1fr}
  .task-form-footer-between{align-items:stretch;flex-direction:column-reverse}
  .task-footer-right{width:100%;margin-left:0}
  .task-footer-right .task-btn,.task-form-footer-between>.task-btn{flex:1}
  #erp-user-menu{width:min(256px,calc(100vw - 24px))!important;min-width:0!important;max-width:calc(100vw - 24px)!important}
}


/* ERP-TAREFAS-AGENDA-PASSO6-20260904 */
.task-switch-row{border:1px solid #e2e8f0;border-radius:10px;padding:12px 13px;display:flex;align-items:center;justify-content:space-between;gap:16px;background:#f8fafc}
.task-switch-row>div{min-width:0}
.task-switch-row b{display:block;font-size:13px;color:#0f172a}
.task-switch-row span:not(.task-switch-track){display:block;margin-top:2px;font-size:11px;line-height:1.4;color:#64748b}
.task-switch-row-compact{background:#fff}
.task-switch{position:relative;display:inline-flex;align-items:center;flex:0 0 auto;cursor:pointer}
.task-switch input{position:absolute;opacity:0;pointer-events:none}
.task-switch-track{position:relative!important;display:block!important;width:42px;height:22px;border-radius:999px;background:#cbd5e1;transition:.18s;margin:0!important}
.task-switch-track:after{content:"";position:absolute;width:18px;height:18px;left:2px;top:2px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(15,23,42,.22);transition:.18s}
.task-switch input:checked + .task-switch-track{background:var(--erp-primary,#ea580c)}
.task-switch input:checked + .task-switch-track:after{transform:translateX(20px)}
.task-switch input:focus-visible + .task-switch-track{outline:3px solid color-mix(in srgb,var(--erp-primary,#ea580c) 20%,transparent);outline-offset:2px}
.task-agenda-panel{border:1px solid #fed7aa;background:#fffaf5;border-radius:12px;padding:14px;display:flex;flex-direction:column;gap:14px}
.task-agenda-hint{padding:10px 11px;border-radius:9px;background:#fff;border:1px solid #ffedd5}
.task-agenda-hint b{display:block;font-size:12px;color:#9a3412}
.task-agenda-hint span{display:block;margin-top:2px;font-size:11px;line-height:1.4;color:#c2410c}
.task-linked-info{display:flex;align-items:center;justify-content:space-between;gap:14px}
.task-linked-info>div{min-width:0}
.task-linked-info .task-btn{flex:0 0 auto}

/* Cabeçalho: fallback adicional para reproduzir a página de OS mesmo caso
   alguma build de utilitários deixe md:flex indisponível nesta rota. */
@media(min-width:768px){
  #erp-shared-header header nav{display:flex!important;align-items:center!important}
}
body.dark .task-switch-row{background:#0a0a0a;border-color:#262626}
body.dark .task-switch-row-compact{background:#111}
body.dark .task-switch-row b{color:#fff}
body.dark .task-switch-row span:not(.task-switch-track){color:#a3a3a3}
body.dark .task-agenda-panel{background:#0c0906;border-color:#5b3512}
body.dark .task-agenda-hint{background:#15100a;border-color:#4b2d12}
body.dark .task-agenda-hint b{color:#fdba74}
body.dark .task-agenda-hint span{color:#fb923c}
@media(max-width:640px){
  .task-linked-info{align-items:stretch;flex-direction:column}
  .task-linked-info .task-btn{width:100%}
}

/* ==========================================================================
   ERP-TAREFAS-HOTFIX-VISUAL-OS-20260904
   MENU DO USUÁRIO — ESPELHO DA PÁGINA DE OS
   ========================================================================== */

#erp-user-menu-wrap {
    position: relative !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

#erp-user-menu-btn {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 9px !important;
    border: 1px solid #e2e8f0 !important;
    background: #f8fafc !important;
    color: #475569 !important;
    font-size: 22px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    cursor: pointer !important;
    transition: all .15s ease !important;
}

#erp-user-menu-btn:hover {
    background: #f1f5f9 !important;
    color: var(--erp-primary-600) !important;
    border-color: #cbd5e1 !important;
}

#erp-user-menu {
    position: absolute !important;
    top: calc(100% + 8px) !important;
    right: 0 !important;
    left: auto !important;
    width: 256px !important;
    min-width: 256px !important;
    max-width: 256px !important;
    margin: 0 !important;
    padding: 8px 0 !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    box-shadow:
        0 10px 15px -3px rgba(0,0,0,.10),
        0 4px 6px -4px rgba(0,0,0,.10) !important;
    overflow: hidden !important;
    z-index: 9999 !important;
}

#erp-user-menu > div:first-child {
    padding: 10px 16px 11px !important;
    border-bottom: 1px solid #f1f5f9 !important;
}

#erp-user-menu > div:first-child > div:first-child {
    font-size: 14px !important;
    line-height: 20px !important;
    font-weight: 700 !important;
}

#erp-user-menu > div:first-child > div:nth-child(2) {
    font-size: 12px !important;
    line-height: 18px !important;
}

#erp-user-menu > div:first-child > div:nth-child(3) {
    font-size: 10px !important;
    line-height: 16px !important;
    margin-top: 2px !important;
}

#erp-user-menu > a {
    display: block !important;
    width: 100% !important;
    padding: 11px 16px !important;
    margin: 0 !important;
    font-size: 14px !important;
    line-height: 20px !important;
    font-weight: 500 !important;
    text-decoration: none !important;
}

#erp-user-menu .erp-theme-row,
#erp-user-menu #erp-menu-dark-row {
    width: 100% !important;
    min-height: 52px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 16px !important;
    padding: 10px 16px !important;
    margin: 0 !important;
    font-size: 14px !important;
    line-height: 20px !important;
}

#erp-menu-sair {
    display: block !important;
    width: 100% !important;
    padding: 11px 16px !important;
    margin: 0 !important;
    border: 0 !important;
    background: transparent !important;
    color: #dc2626 !important;
    font-size: 14px !important;
    line-height: 20px !important;
    font-weight: 500 !important;
    text-align: left !important;
    cursor: pointer !important;
}

#erp-menu-sair:hover {
    background: #fef2f2 !important;
}

#erp-user-menu > .border-t {
    margin: 0 !important;
    border-top: 1px solid #e2e8f0 !important;
}

#erp-user-menu.hidden {
    display: none !important;
}

/* ==========================================================================
   DARK MODE — MESMAS REGRAS GERAIS DA PÁGINA DE OS
   ========================================================================== */

body.dark {
    background-color: #000000 !important;
    color: #e5e5e5 !important;
}

body.dark .bg-white {
    background-color: #111111 !important;
    border-color: #262626 !important;
}

body.dark .bg-slate-50 {
    background-color: #0a0a0a !important;
    border-color: #262626 !important;
}

body.dark .text-slate-900,
body.dark .text-slate-800,
body.dark .text-slate-700 {
    color: #ffffff !important;
}

body.dark .text-slate-600,
body.dark .text-slate-500 {
    color: #a3a3a3 !important;
}

body.dark .border-slate-200,
body.dark .border-slate-300 {
    border-color: #262626 !important;
}

body.dark .bg-slate-100 {
    background-color: #1a1a1a !important;
    color: #d4d4d4 !important;
    border-color: #333333 !important;
}

body.dark input,
body.dark select,
body.dark textarea {
    background-color: #000000 !important;
    color: #ffffff !important;
    border-color: #333333 !important;
}

body.dark .hover\:bg-slate-50:hover {
    background-color: #1a1a1a !important;
}

body.dark .hover\:bg-slate-100:hover {
    background-color: #262626 !important;
}

body.dark .bg-orange-50 {
    background-color: var(--erp-primary-950) !important;
    color: var(--erp-primary-300) !important;
}

body.dark .hover\:bg-orange-50:hover {
    background-color: var(--erp-primary-950) !important;
}

body.dark header {
    background-color: #111111 !important;
    border-color: #262626 !important;
}

/* Dropdowns do menu principal compartilhado. */
body.dark #erp-shared-header nav > div > div {
    background-color: #111111 !important;
    border-color: #262626 !important;
}

body.dark #erp-shared-header nav > div > div a {
    color: #e5e5e5 !important;
}

body.dark #erp-shared-header nav > div > div a:hover {
    background-color: #262626 !important;
    color: var(--erp-primary-400) !important;
}

body.dark #erp-shared-header nav > div > div hr {
    border-color: #262626 !important;
}

/* Menu ⋮ no dark mode — espelho da OS. */
body.dark #erp-user-menu-btn {
    background: #171717 !important;
    color: #e5e5e5 !important;
    border-color: #333333 !important;
}

body.dark #erp-user-menu-btn:hover {
    background: #262626 !important;
    color: var(--erp-primary-400) !important;
}

body.dark #erp-user-menu {
    background: #111111 !important;
    border-color: #2f2f2f !important;
    color: #ffffff !important;
}

body.dark #erp-user-menu > div:first-child {
    border-bottom-color: #333333 !important;
}

body.dark #erp-user-menu > a {
    color: #ffffff !important;
}

body.dark #erp-user-menu > a:hover {
    background: #262626 !important;
    color: var(--erp-primary-400) !important;
}

body.dark #erp-user-menu .erp-theme-row,
body.dark #erp-user-menu #erp-menu-dark-row {
    color: #ffffff !important;
}

body.dark #erp-user-menu > .border-t {
    border-top-color: #333333 !important;
}

body.dark #erp-menu-sair {
    color: #ef4444 !important;
}

body.dark #erp-menu-sair:hover {
    background: #2a1111 !important;
}

/* Kanban — fecha os pontos claros restantes. */
body.dark .task-page-main {
    background: #000000 !important;
}

body.dark .task-kanban {
    background: #111111 !important;
}

body.dark .task-title-card,
body.dark .task-board-card,
body.dark .task-kanban-shell {
    box-shadow: none !important;
}

body.dark .task-btn-primary {
    color: #ffffff !important;
}

body.dark .task-btn-secondary {
    background: #171717 !important;
    border-color: #333333 !important;
    color: #e5e5e5 !important;
}

body.dark .task-btn-secondary:hover {
    background: #262626 !important;
    border-color: #404040 !important;
}

body.dark .task-add-card {
    color: #a3a3a3 !important;
    border-color: #525252 !important;
}

body.dark .task-add-card:hover {
    background: #171717 !important;
    color: var(--erp-primary-400) !important;
    border-color: var(--erp-primary-500) !important;
}

body.dark .task-due {
    background: #262626 !important;
    color: #d4d4d4 !important;
}

body.dark .task-due.overdue {
    background: #2a1111 !important;
    color: #f87171 !important;
}

body.dark .task-due.today {
    background: #2b1b08 !important;
    color: #fb923c !important;
}

body.dark .task-avatar {
    background: #262626 !important;
    color: #e5e5e5 !important;
}

@media (max-width: 640px) {
    #erp-user-menu {
        width: min(256px, calc(100vw - 24px)) !important;
        min-width: 0 !important;
        max-width: calc(100vw - 24px) !important;
    }
}


/* ERP-TAREFAS-ARQUIVADOS-PASSO7-20260904 */
.task-title-actions{flex-wrap:nowrap;align-items:center}
.task-title-actions .task-board-select{min-width:220px;max-width:320px;flex:0 0 260px}
.task-title-actions .task-btn{flex:0 0 auto}

.task-archive-toolbar{padding:16px 20px;border-bottom:1px solid #e2e8f0;display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.task-archive-summary{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.task-archive-chip{display:inline-flex;align-items:center;justify-content:center;min-height:28px;padding:0 10px;border-radius:999px;background:#f1f5f9;border:1px solid #e2e8f0;font-size:12px;font-weight:700;color:#475569}
.task-archives-content{padding:18px 20px 20px;display:flex;flex-direction:column;gap:16px}
.task-archives-section{display:flex;flex-direction:column;gap:10px}
.task-archives-section h3{font-size:14px;font-weight:800;color:#0f172a}
.task-archives-section p{font-size:12px;color:#64748b}
.task-archive-list{display:flex;flex-direction:column;gap:10px}
.task-archive-item{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;padding:14px;border:1px solid #e2e8f0;border-radius:12px;background:#fff}
.task-archive-item-copy{min-width:0;display:flex;flex-direction:column;gap:6px}
.task-archive-item-copy strong{font-size:14px;color:#0f172a;line-height:1.35}
.task-archive-item-copy p{font-size:12px;line-height:1.45;color:#64748b}
.task-archive-meta{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.task-archive-meta span{display:inline-flex;align-items:center;min-height:24px;padding:0 8px;border-radius:999px;background:#f8fafc;border:1px solid #e2e8f0;font-size:11px;font-weight:700;color:#475569}
.task-archive-item .task-btn{margin-left:auto}
.task-archives-empty{padding:28px 20px 6px;display:flex;align-items:center;justify-content:center;flex-direction:column;text-align:center}
.task-archives-empty h3{font-size:18px;font-weight:700;color:#0f172a}
.task-archives-empty p{font-size:13px;color:#64748b;margin-top:6px;max-width:460px}

body.dark .task-archive-toolbar{border-color:#262626}
body.dark .task-archive-chip{background:#171717;border-color:#333;color:#d4d4d4}
body.dark .task-archives-section h3,
body.dark .task-archive-item-copy strong,
body.dark .task-archives-empty h3{color:#fff}
body.dark .task-archives-section p,
body.dark .task-archive-item-copy p,
body.dark .task-archives-empty p{color:#a3a3a3}
body.dark .task-archive-item{background:#111;border-color:#262626}
body.dark .task-archive-meta span{background:#171717;border-color:#333;color:#d4d4d4}

@media(max-width:900px){
  .task-title-actions{flex-wrap:wrap;justify-content:flex-start}
  .task-title-actions .task-board-select{flex:1 1 240px;max-width:none}
}
@media(max-width:640px){
  .task-title-actions{display:grid;grid-template-columns:1fr 1fr}
  .task-title-actions .task-board-select{grid-column:1 / -1;flex:none;min-width:0;max-width:none}
  .task-archive-toolbar{padding:14px 16px}
  .task-archives-content{padding:14px 16px 16px}
  .task-archive-item{align-items:stretch;flex-direction:column}
  .task-archive-item .task-btn{margin-left:0;width:100%}
}

/* ERP-DATE-TIME-PICKERS-HOTFIX-20260904
   Espelho do date-control de Contas a Pagar, estendido para datetime-local. */
.erp-picker-control{position:relative;margin-top:.25rem}
.erp-picker-control .agenda-input,
.erp-picker-control .task-input{margin-top:0!important;padding-right:2.75rem!important}
.erp-picker-datetime .agenda-input,
.erp-picker-datetime .task-input{padding-right:5.05rem!important}
.erp-picker-control input::-webkit-calendar-picker-indicator{opacity:0;width:0}
.erp-picker-btn{
  position:absolute;top:50%;transform:translateY(-50%);
  width:2rem;height:2rem;display:flex;align-items:center;justify-content:center;
  border:0;border-radius:.5rem;background:transparent;color:#64748b;
  font-size:.95rem;line-height:1;cursor:pointer
}
.erp-picker-calendar{right:.32rem}
.erp-picker-datetime .erp-picker-calendar{right:2.58rem}
.erp-picker-clock{right:.32rem}
.erp-picker-btn:hover{background:#f1f5f9;color:var(--erp-primary-600,#ea580c)}
body.dark .erp-picker-btn{color:#a3a3a3}
body.dark .erp-picker-btn:hover{background:#262626;color:var(--erp-primary-400,#fb923c)}

/* ERP-TAREFAS-SYNC-AGENDA-PASSO8-20260905 */
.task-link-scope{
  margin:4px 0 18px;
  padding:14px;
  border:1px solid #e2e8f0;
  border-radius:12px;
  background:#f8fafc
}
.task-link-scope label{
  display:block;
  font-size:12px;
  font-weight:700;
  color:#334155
}
.task-link-help{
  margin:8px 0 0;
  font-size:11px;
  color:#64748b
}
.task-link-decision-footer{
  display:flex;
  flex-wrap:wrap;
  justify-content:flex-end;
  gap:8px
}
body.dark .task-link-scope{
  background:#0a0a0a;
  border-color:#262626
}
body.dark .task-link-scope label{color:#e5e5e5}
body.dark .task-link-help{color:#a3a3a3}
@media (max-width:640px){
  .task-link-decision-footer{display:grid;grid-template-columns:1fr}
  .task-link-decision-footer .task-btn{width:100%}
}


/* ERP-TAREFAS-DASHBOARD-STATUS-20260907 */
.task-dashboard-filter{border:1px solid var(--erp-primary-200);background:var(--erp-primary-50);color:var(--erp-primary-800);padding:10px 12px;border-radius:12px;font-size:12px;font-weight:700;margin-bottom:10px}
body.dark .task-dashboard-filter{background:var(--erp-primary-950);border-color:var(--erp-primary-800);color:var(--erp-primary-200)}
