/* Isolated, phone-first work/handover module. */
.tasks-module { display: grid; gap: 18px; width: min(100%, 920px); margin: 0 auto; padding: 18px 16px 24px; }
.tasks-heading { display: grid; gap: 6px; }
.tasks-heading h1 { font-size: 24px; }
.tasks-heading p, .tasks-disclosure { font-size: 14px; color: var(--muted); }
.tasks-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tasks-summary > div { padding: 12px 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; text-align: center; }
.tasks-summary strong { display: block; font-size: 25px; font-variant-numeric: tabular-nums; }
.tasks-summary span { display: block; font-size: 13px; overflow-wrap: anywhere; }
.tasks-summary .tasks-attention { color: var(--amber); }
.tasks-toolbar, .task-actions, .task-title-row, .tasks-create-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tasks-toolbar select { flex: 1; width: auto; min-width: 0; }
.tasks-toolbar button { flex: none; }
.tasks-create, .task-card { border: 1px solid var(--line); background: var(--surface); border-radius: 16px; padding: 16px; min-width: 0; }
.tasks-create > summary { cursor: pointer; color: var(--jade); font-weight: 700; min-height: 44px; display: flex; align-items: center; }
.tasks-create form { margin-top: 12px; }
.tasks-create-row > label { flex: 1; min-width: 140px; }
.tasks-list { display: grid; gap: 12px; }
.task-card { display: grid; gap: 12px; }
.task-title-row { align-items: start; }
.task-title-row h2 { font-size: 18px; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.task-state { font-size: 13px; font-weight: 700; padding: 4px 8px; border-radius: 8px; background: var(--surface-2); }
.task-state.submitted { background: var(--sun-soft); color: var(--amber); }
.task-state.resolved { background: var(--jade-soft); color: var(--jade); }
.task-meta { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.task-overdue { color: var(--red); font-weight: 700; }
.task-copy { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; }
.task-note { padding: 12px; background: var(--surface-2); border-radius: 10px; display: grid; gap: 4px; }
.task-note > strong { font-size: 13px; color: var(--muted); }
.task-card details > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; color: var(--jade); font-size: 14px; }
.task-card details textarea, .task-card details select { margin: 6px 0 10px; }
.task-actions > button { flex: 1; white-space: normal; }
.task-card [data-assign] { display: grid; gap: 8px; }
.task-card .btn { min-height: 46px; }
.task-history { display: grid; gap: 10px; padding-left: 22px; margin: 8px 0 0; }
.task-history li { font-size: 13px; overflow-wrap: anywhere; }
.task-history time { display: block; color: var(--muted); }
.tasks-error { border: 1px solid var(--red); color: var(--red); background: var(--surface); padding: 12px; border-radius: 10px; font-size: 14px; }
.tasks-error:empty { display: none; }
.tasks-empty { text-align: center; padding: 32px 16px; color: var(--muted); background: var(--surface); border: 1px dashed var(--line); border-radius: 14px; }
.tasks-more { width: 100%; }
.tasks-module [hidden] { display: none !important; }
@media (max-width: 600px) {
  .tasks-summary span, .task-state, .task-meta, .task-note > strong, .task-history li, .tasks-module label { font-size: 14px; line-height: 1.6; }
  .tasks-module input, .tasks-module select, .tasks-module textarea { font-size: 16px; }
  .tasks-create-row > label { min-width: 0; flex-basis: 100%; }
}
@media (min-width: 760px) { .tasks-module { padding: 26px 24px; } .tasks-list { grid-template-columns: repeat(2, minmax(0,1fr)); align-items: start; } .tasks-empty { grid-column: 1 / -1; } }

/* Task-first refinement: clear status, deliberate actions, persistent form DOM. */
.tasks-module{gap:16px}.tasks-heading h1{font-size:26px;line-height:1.35}.tasks-heading p{line-height:1.7}
.tasks-summary{gap:10px}.tasks-summary>div{padding:16px 10px;border-radius:16px}.tasks-summary strong{font-size:28px;line-height:1.3;margin-bottom:5px}
.tasks-summary>div:first-child{background:var(--jade-soft);border-color:var(--jade);color:var(--jade-deep)}
.tasks-toolbar{padding:4px 0;gap:10px}.tasks-toolbar select,.tasks-toolbar button{min-height:46px}
.task-card{padding:20px;border-radius:18px;gap:14px;box-shadow:0 2px 8px #13292305}
.task-title-row{gap:12px}.task-title-row h2{line-height:1.5}.task-state{padding:6px 10px;line-height:1.5;white-space:normal}
.task-meta,.task-copy,.task-note,.tasks-disclosure{line-height:1.75}.task-note{border:1px solid var(--line);padding:14px}
.task-card details>summary{padding-block:8px;font-weight:650}.task-actions{gap:10px}.task-actions>.btn{min-height:48px}
.tasks-error{padding:14px 16px;border-left-width:4px;line-height:1.7;overflow-wrap:anywhere}.tasks-empty{padding:36px 20px;line-height:1.75;border-style:solid}
@media(max-width:600px){.tasks-module{padding:16px 0 26px}.tasks-heading h1{font-size:25px}.tasks-summary>div{padding:14px 8px}.task-card{padding:18px 16px}.tasks-summary strong{font-size:27px}.tasks-heading p,.tasks-disclosure,.task-copy,.tasks-error,.tasks-empty{font-size:14px}.task-actions>.btn{flex-basis:calc(50% - 5px)}}
@media(max-width:360px){.tasks-summary{gap:6px}.tasks-summary>div{padding:12px 6px}.task-actions>.btn{flex-basis:100%}}

/* Native details internals must not change form-control sizing or overflow cards. */
.task-card details { min-width: 0; }
.tasks-module input, .tasks-module select, .tasks-module textarea {
  box-sizing: border-box;
  max-width: 100%;
  min-width: 0;
}
