.task-card-context-tools {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}
.task-card-context-tools + .task-card-actions {
  margin-left: 0 !important;
}
.task-checklist-inline {
  margin: 16px 0 8px;
  border: 1px solid rgba(145, 125, 235, 0.18);
  border-radius: 16px;
  background: linear-gradient(
    145deg,
    rgba(139, 117, 232, 0.055),
    rgba(16, 17, 21, 0.2) 48%
  );
  overflow: hidden;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.12);
}
.task-checklist-summary {
  width: 100%;
  min-height: 58px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 10px 14px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.task-checklist-summary:hover {
  background: rgba(130, 108, 226, 0.055);
}
.task-checklist-summary-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(161, 140, 249, 0.2);
  border-radius: 11px;
  background: linear-gradient(
    145deg,
    rgba(129, 105, 229, 0.2),
    rgba(129, 105, 229, 0.07)
  );
  color: #b6a8fb;
}
.task-checklist-summary-icon svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.task-checklist-summary > span:nth-child(2) {
  min-width: 0;
}
.task-checklist-summary small {
  display: block;
  color: #9b89e8;
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.14em;
}
.task-checklist-summary strong {
  display: block;
  margin-top: 3px;
  color: #e4e2e9;
  font-size: 12px;
}
.task-checklist-summary em {
  font-style: normal;
  color: #a8a6b0;
  font-size: 10px;
  font-weight: 800;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
}
.task-checklist-summary > i {
  font-style: normal;
  color: #83818d;
  transition: transform 0.18s;
}
.task-checklist-inline.is-open .task-checklist-summary > i {
  transform: rotate(180deg);
}
.task-checklist-inline.is-complete {
  border-color: rgba(73, 201, 153, 0.24);
  background: linear-gradient(
    145deg,
    rgba(50, 162, 121, 0.06),
    rgba(16, 17, 21, 0.18)
  );
}
.task-checklist-inline.is-complete .task-checklist-summary-icon,
.task-checklist-inline.is-complete .task-checklist-summary em {
  color: #67d8af;
}
.task-checklist-inline-content {
  padding: 0 14px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.task-checklist-inline-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 13px 1px 10px;
}
.task-checklist-inline-head > div > span {
  display: block;
  color: #d0cdd8;
  font-size: 11px;
  font-weight: 850;
}
.task-checklist-inline-head > div > small {
  display: block;
  margin-top: 3px;
  color: #777783;
  font-size: 9px;
}
.task-check-generate {
  height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 9px 0 11px;
  border: 1px solid rgba(146, 124, 242, 0.34);
  border-radius: 10px;
  background: rgba(119, 91, 226, 0.13);
  color: #c4b8ff;
  font-size: 10px;
  font-weight: 850;
  cursor: pointer;
}
.task-check-generate i {
  font-style: normal;
  font-size: 13px;
}
.task-check-generate b {
  min-width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: #7d64e8;
  color: #fff;
  font-size: 9px;
}
.task-check-generate:disabled {
  opacity: 0.36;
  cursor: not-allowed;
  filter: grayscale(0.35);
}
.task-checklist-inline-items {
  display: grid;
  gap: 6px;
}
.task-check-item {
  position: relative;
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  min-height: 48px;
  margin-left: calc(var(--check-depth) * 20px);
  padding: 7px 8px;
  border: 1px solid rgba(255, 255, 255, 0.065);
  border-radius: 11px;
  background: rgba(8, 9, 12, 0.17);
}
.task-check-item:before {
  content: "";
  position: absolute;
  left: calc(var(--check-depth) * -20px - 1px);
  top: -7px;
  width: 14px;
  height: 31px;
  border-left: 1px solid rgba(142, 122, 222, 0.18);
  border-bottom: 1px solid rgba(142, 122, 222, 0.18);
  border-radius: 0 0 0 8px;
}
.task-check-item[style*="--check-depth:0"]:before {
  display: none;
}
.task-check-item:hover {
  border-color: rgba(149, 129, 237, 0.16);
  background: rgba(130, 108, 226, 0.035);
}
.task-check-item.is-done {
  border-color: rgba(68, 192, 145, 0.13);
  background: rgba(49, 155, 115, 0.035);
}
.task-check-item.has-generated-task {
  border-color: rgba(69, 171, 204, 0.2);
  background: linear-gradient(
    90deg,
    rgba(45, 136, 164, 0.055),
    rgba(0, 0, 0, 0.05)
  );
}
.task-check-select {
  width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.task-check-select input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.task-check-select span {
  width: 15px;
  height: 15px;
  border: 1px solid rgba(172, 162, 207, 0.38);
  border-radius: 5px;
  background: #1b1c21;
  box-shadow: inset 0 0 0 3px #1b1c21;
  transition: 0.15s;
}
.task-check-select input:checked + span {
  border-color: #9b84f4;
  background: #8a70ed;
}
.task-check-select-spacer {
  width: 19px;
}
.task-check-toggle {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(157, 139, 245, 0.34);
  border-radius: 8px;
  background: #282832;
  color: transparent;
  cursor: pointer;
}
.task-check-toggle span {
  font-size: 11px;
}
.is-done .task-check-toggle {
  border-color: rgba(80, 207, 160, 0.42);
  background: #257a5c;
  color: #fff;
}
.task-check-toggle:disabled {
  cursor: not-allowed;
}
.task-check-copy {
  min-width: 0;
}
.task-check-copy > strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #dcdae2;
  font-size: 11px;
  white-space: nowrap;
}
.task-check-item.is-done .task-check-copy > strong {
  color: #9899a2;
  text-decoration: line-through;
  text-decoration-color: rgba(255, 255, 255, 0.2);
}
.task-check-copy > small {
  display: block;
  margin-top: 3px;
  color: #777983;
  font-size: 9px;
}
.task-check-actions {
  display: flex;
  gap: 3px;
}
.task-check-actions button {
  width: 25px;
  height: 25px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #737581;
  font-size: 14px;
  cursor: pointer;
}
.task-check-actions button:first-child:hover {
  background: rgba(133, 110, 232, 0.11);
  color: #b7a8fa;
}
.task-check-actions .task-check-remove:hover {
  background: rgba(255, 102, 117, 0.1);
  color: #ff7885;
}
.task-check-actions button:disabled {
  opacity: 0.28;
  cursor: not-allowed;
}
.task-check-generated {
  display: flex;
  align-items: center;
  gap: 7px;
  width: max-content;
  max-width: 100%;
  margin-top: 5px;
  padding: 4px 8px 4px 6px;
  border: 1px solid rgba(75, 175, 207, 0.23);
  border-radius: 8px;
  background: rgba(45, 138, 170, 0.08);
  color: #9bdcf0;
  text-align: left;
  cursor: pointer;
}
.task-check-generated > i {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: rgba(52, 157, 190, 0.16);
  font-style: normal;
}
.task-check-generated span {
  min-width: 0;
}
.task-check-generated b,
.task-check-generated small {
  display: block;
}
.task-check-generated b {
  font-size: 9px;
}
.task-check-generated small {
  margin-top: 1px;
  color: #7f969d;
  font-size: 8px;
}
.task-check-child-form {
  grid-column: 3/-1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 6px;
  align-items: center;
  margin: 2px 0 2px 0;
  padding-top: 7px;
  border-top: 1px dashed rgba(255, 255, 255, 0.07);
}
.task-check-child-form > i {
  color: #8d79e5;
  font-style: normal;
}
.task-check-child-form input,
.task-checklist-inline-add input {
  min-width: 0;
  height: 34px;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 9px;
  background: #18191d;
  color: #eee;
  outline: none;
  font-size: 11px;
}
.task-check-child-form input:focus,
.task-checklist-inline-add input:focus {
  border-color: #8c74eb;
  box-shadow: 0 0 0 3px rgba(128, 106, 231, 0.1);
}
.task-check-child-form button {
  height: 31px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: #6f59d6;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  cursor: pointer;
}
.task-check-child-form button:last-child {
  background: transparent;
  color: #83838d;
}
.task-checklist-inline-add {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  margin-top: 9px;
  padding: 8px;
  border: 1px dashed rgba(153, 134, 239, 0.17);
  border-radius: 11px;
  background: rgba(128, 105, 229, 0.025);
}
.task-checklist-inline-add > span {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(124, 100, 226, 0.1);
  color: #a895f5;
}
.task-checklist-inline-add button {
  height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 9px;
  background: linear-gradient(135deg, #745dde, #826bea);
  color: #fff;
  font-size: 10px;
  font-weight: 850;
  cursor: pointer;
}
.task-checklist-inline-add button:disabled {
  opacity: 0.55;
  cursor: wait;
}
.task-checklist-inline-empty {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 2px 0 9px;
  padding: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.07);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.018);
}
.task-checklist-inline-empty > span {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: rgba(127, 104, 228, 0.09);
  color: #a997f3;
}
.task-checklist-inline-empty strong {
  display: block;
  color: #bdbbc5;
  font-size: 11px;
}
.task-checklist-inline-empty p {
  margin: 3px 0 0;
  color: #747680;
  font-size: 9px;
}
.task-checklist-inline-error,
.task-checklist-inline-loading {
  margin: 8px 0;
  padding: 10px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.025);
  color: #85868e;
  font-size: 10px;
}
.task-checklist-inline-error {
  color: #ff8994;
}
.check-task-generator {
  display: grid;
  gap: 15px;
  min-width: min(650px, 78vw);
}
.check-task-generator > header {
  display: flex;
  gap: 13px;
  align-items: center;
  padding: 15px;
  border: 1px solid rgba(147, 124, 240, 0.22);
  border-radius: 14px;
  background: linear-gradient(
    135deg,
    rgba(129, 105, 229, 0.13),
    rgba(42, 43, 50, 0.22)
  );
}
.check-task-generator > header > span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #735bd8;
  color: white;
  font-size: 19px;
}
.check-task-generator header small {
  display: block;
  color: #a894fa;
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.14em;
}
.check-task-generator header strong {
  display: block;
  margin-top: 3px;
  color: #eceaf1;
  font-size: 15px;
}
.check-task-generator header p {
  margin: 4px 0 0;
  color: #8f8d98;
  font-size: 10px;
}
.check-task-date {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 14px;
  align-items: center;
  padding: 0 2px;
}
.check-task-date span {
  color: #aaa7b3;
  font-size: 10px;
  font-weight: 800;
}
.check-task-date input {
  grid-row: 1/3;
  grid-column: 2;
  height: 38px;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9px;
  background: #1b1c21;
  color: #eee;
}
.check-task-date small {
  color: #71727b;
  font-size: 9px;
}
.check-task-preview {
  display: grid;
  gap: 7px;
  max-height: 310px;
  overflow: auto;
  padding-right: 3px;
}
.check-task-preview article {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 11px;
  background: rgba(0, 0, 0, 0.08);
}
.check-task-preview article > i {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(129, 105, 229, 0.1);
  color: #aa98f6;
  font-size: 9px;
  font-style: normal;
  font-weight: 850;
}
.check-task-preview strong {
  display: block;
  color: #d8d6df;
  font-size: 11px;
}
.check-task-preview small {
  display: block;
  margin-top: 3px;
  color: #747681;
  font-size: 9px;
}
.check-task-preview label {
  display: grid;
  grid-template-columns: auto auto;
  gap: 2px 5px;
  align-items: center;
}
.check-task-preview label span {
  grid-column: 1/3;
  color: #777985;
  font-size: 8px;
  font-weight: 800;
}
.check-task-preview input {
  width: 67px;
  height: 31px;
  padding: 0 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: #191a1e;
  color: #eee;
}
.check-task-preview em {
  color: #777985;
  font-size: 9px;
  font-style: normal;
}
.check-task-generator > aside {
  display: flex;
  gap: 9px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(61, 171, 130, 0.06);
  color: #77cdaa;
}
.check-task-generator > aside i {
  font-style: normal;
}
.check-task-generator > aside p {
  margin: 0;
  color: #8a9a94;
  font-size: 9px;
  line-height: 1.45;
}
@media (max-width: 720px) {
  .task-checklist-inline-head {
    align-items: flex-start;
  }
  .task-checklist-inline-head > div > small {
    display: none;
  }
  .task-check-generate span {
    display: none;
  }
  .task-check-item {
    margin-left: calc(min(var(--check-depth), 4) * 12px);
    grid-template-columns: auto auto minmax(0, 1fr);
  }
  .task-check-actions {
    grid-column: 3;
    justify-self: end;
  }
  .task-check-child-form {
    grid-column: 2/-1;
    grid-template-columns: auto minmax(0, 1fr);
  }
  .task-check-child-form button {
    grid-row: 2;
  }
  .task-checklist-inline-add {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .task-checklist-inline-add button {
    grid-column: 2;
  }
  .check-task-generator {
    min-width: 0;
  }
  .check-task-preview article {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .check-task-preview label {
    grid-column: 2;
  }
  .check-task-date {
    grid-template-columns: 1fr;
  }
  .check-task-date input {
    grid-row: auto;
    grid-column: auto;
  }
}
.task-check-actions .task-check-start {
  border: 1px solid rgba(75, 211, 161, 0.25);
  background: rgba(75, 211, 161, 0.08);
  color: #55d7a7;
  font-size: 10px;
}
.task-check-actions .task-check-start:hover {
  border-color: rgba(75, 211, 161, 0.5);
  background: rgba(75, 211, 161, 0.16);
  color: #8aefca;
}
.task-check-copy > small.is-running {
  color: #55d7a7;
}

/* Gerador v2: largura contida, várias tarefas por item e rodapé sempre acessível. */
.modal-layer:has(.check-task-generator) {
  padding: 16px;
}
.modal:has(.check-task-generator) {
  display: flex;
  width: min(780px, calc(100vw - 32px));
  max-width: 780px;
  max-height: calc(100dvh - 32px);
  overflow: hidden;
}
.modal:has(.check-task-generator) > form {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}
.modal:has(.check-task-generator) .modal-body {
  flex: 1;
  min-width: 0;
  min-height: 0;
  max-height: none;
  padding: 22px 24px;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
}
.modal:has(.check-task-generator) .modal-head,
.modal:has(.check-task-generator) .modal-actions {
  flex: none;
}
.modal:has(.check-task-generator) .modal-actions {
  position: relative;
  z-index: 2;
  background: color-mix(in srgb, var(--surface) 96%, #11131a);
}
.check-task-generator {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.check-task-generator > header {
  min-width: 0;
}
.check-task-generator > header > div {
  min-width: 0;
}
.check-task-generator > header strong {
  display: flex;
  align-items: baseline;
  gap: 5px;
}
.check-task-generator > header strong b {
  color: #c4b7ff;
  font:
    850 17px/1 Manrope,
    sans-serif;
}
.check-task-date {
  grid-template-columns: minmax(0, 1fr) minmax(170px, 220px);
  min-width: 0;
}
.check-task-date input {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.check-task-groups {
  display: grid;
  gap: 11px;
  min-width: 0;
}
.check-task-group {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.09);
}
.check-task-group > header {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 11px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.065);
  background: linear-gradient(90deg, rgba(135, 110, 235, 0.075), transparent);
}
.check-task-group > header > i {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: rgba(129, 105, 229, 0.13);
  color: #ae9afa;
  font:
    850 9px/1 Manrope,
    sans-serif;
  font-style: normal;
}
.check-task-group > header > div {
  min-width: 0;
}
.check-task-group > header small,
.check-task-group > header strong {
  display: block;
}
.check-task-group > header small {
  color: #8e7fde;
  font-size: 7px;
  font-weight: 850;
  letter-spacing: 0.13em;
}
.check-task-group > header strong {
  margin-top: 3px;
  overflow: hidden;
  color: #d9d6e1;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.check-task-group > header > button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 31px;
  padding: 0 10px;
  border: 1px solid rgba(151, 129, 241, 0.3);
  border-radius: 9px;
  background: rgba(126, 101, 224, 0.1);
  color: #baaaf8;
  font-size: 9px;
  font-weight: 850;
  cursor: pointer;
}
.check-task-group > header > button:hover {
  border-color: rgba(171, 151, 250, 0.6);
  background: rgba(126, 101, 224, 0.18);
}
.check-task-group > header > button span {
  font-size: 13px;
}
.check-task-drafts {
  display: grid;
  gap: 7px;
  padding: 9px;
}
.check-task-draft {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 112px 28px;
  gap: 9px;
  align-items: end;
  min-width: 0;
  padding: 9px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 11px;
  background: rgba(23, 24, 29, 0.72);
}
.check-task-draft-mark {
  display: grid;
  place-items: center;
  align-self: center;
  width: 27px;
  height: 27px;
  border-radius: 8px;
  background: rgba(76, 190, 151, 0.09);
  color: #62d4ad;
  font-size: 12px;
}
.check-task-draft label {
  display: grid;
  gap: 5px;
  min-width: 0;
}
.check-task-draft label > span:first-child {
  color: #7f7d89;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.05em;
}
.check-task-draft input {
  width: 100%;
  height: 36px;
  min-width: 0;
  box-sizing: border-box;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9px;
  background: #191a1f;
  color: #eee;
  font: inherit;
  font-size: 10px;
  outline: 0;
}
.check-task-draft input:focus {
  border-color: #8c74eb;
  box-shadow: 0 0 0 3px rgba(128, 106, 231, 0.1);
}
.check-task-draft-time > span:last-child {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px;
  align-items: center;
}
.check-task-draft-time em {
  color: #777985;
  font-size: 8px;
  font-style: normal;
}
.check-task-draft-remove {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  margin-bottom: 4px;
  border: 1px solid rgba(235, 105, 119, 0.19);
  border-radius: 8px;
  background: rgba(222, 86, 101, 0.06);
  color: #b96c76;
  cursor: pointer;
}
.check-task-draft-remove:hover {
  border-color: rgba(241, 110, 124, 0.45);
  color: #f28590;
}
.check-task-draft-remove[hidden] {
  visibility: hidden;
}
.task-check-generated-list {
  display: grid;
  gap: 4px;
  margin-top: 5px;
}
.task-check-generated-list .task-check-generated {
  margin-top: 0;
}
@media (max-width: 680px) {
  .modal-layer:has(.check-task-generator) {
    padding: 0;
  }
  .modal:has(.check-task-generator) {
    width: 100vw;
    max-width: none;
    height: 100dvh;
    max-height: none;
    border-radius: 0;
  }
  .modal:has(.check-task-generator) .modal-body {
    padding: 16px 14px;
  }
  .check-task-generator > header {
    align-items: flex-start;
    padding: 13px;
  }
  .check-task-generator > header p {
    line-height: 1.45;
  }
  .check-task-date {
    grid-template-columns: 1fr;
  }
  .check-task-date input {
    grid-row: auto;
    grid-column: auto;
  }
  .check-task-group > header {
    grid-template-columns: 28px minmax(0, 1fr);
  }
  .check-task-group > header > button {
    grid-column: 2;
    justify-self: start;
  }
  .check-task-draft {
    grid-template-columns: 25px minmax(0, 1fr) 27px;
  }
  .check-task-draft-time {
    grid-column: 2;
  }
  .check-task-draft-remove {
    grid-column: 3;
    grid-row: 1;
    margin: 0;
  }
  .modal:has(.check-task-generator) .modal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 11px 14px;
  }
  .modal:has(.check-task-generator) .modal-actions .btn {
    min-width: 0;
  }
}
