:root {
  color-scheme: light;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #20332c;
  background: #f5f6f3;
  font-synthesis: none;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
.app { max-width: 1160px; margin: 0 auto; padding: 28px 16px max(24px, env(safe-area-inset-bottom)); }
.brand { margin: 0 0 4px; color: #28664c; font-size: 18px; font-weight: 800; letter-spacing: -.5px; }
h1 { margin: 0 0 24px; font-size: clamp(26px, 6vw, 32px); letter-spacing: -.8px; }
h2 { margin: 0; font-size: 19px; }
p { line-height: 1.5; }
.demo { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: center; margin-bottom: 22px; }
.demo p { grid-column: 1 / -1; margin: 0; font-size: 13px; color: #5b6861; }
label { display: block; font-size: 15px; font-weight: 600; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
button { min-height: 48px; border: 1px solid #d4dcd5; border-radius: 12px; padding: 12px 16px; background: #fff; color: #20332c; font-weight: 650; touch-action: manipulation; }
button:hover { background: #eef2ed; }
.primary { background: #28664c; border-color: #28664c; color: #fff; }
.primary:hover { background: #1d503a; }
.full { width: 100%; }
input, select, textarea { min-height: 48px; width: 100%; border: 1px solid #bdc9bf; border-radius: 10px; background: #fff; color: #20332c; padding: 12px; font-size: 16px; }
textarea { resize: vertical; }
:focus-visible { outline: 3px solid #9a6c18; outline-offset: 3px; }
.tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; margin: 24px 0; padding: 4px; border-radius: 14px; background: #e7ece5; }
.tabs button { padding: 10px 2px; border: 0; background: transparent; border-radius: 10px; font-size: 14px; }
.tabs button[aria-pressed="true"] { background: #fff; color: #205239; box-shadow: 0 1px 3px #20332c16; }
.tabs span { display: inline-block; margin-left: 2px; font-size: 12px; color: #57645b; }
.ideas-tab { margin-top: 20px; background: #f3f0e8; border-style: dashed; text-align: left; }
.ideas-tab[aria-pressed="true"] { background: #fff1d6; border-style: solid; border-color: #9a6c18; }
.ideas-tab span { margin-left: 8px; font-size: 13px; }
.ideas-tab + .tabs { margin-top: 12px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 14px; }
fieldset { min-width: 0; }
.filters { margin: 0 0 20px; padding: 12px; border: 1px solid #dfe5dc; border-radius: 14px; display: grid; gap: 10px; }
.filters legend, .category-field legend { padding: 0 4px; font-size: 14px; font-weight: 650; }
.filters > div { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 8px; align-items: center; }
.filters label { font-size: 13px; }
.filters select { min-width: 0; padding: 10px 6px; font-size: 14px; }
#clear-filters { justify-self: end; background: transparent; border-color: transparent; padding: 6px 10px; font-size: 13px; }
.category-field { margin: 18px 0 0; padding: 10px; border: 1px solid #bdc9bf; border-radius: 10px; }
#categories-options { display: grid; gap: 6px; }
dialog .category-choice { display: flex; align-items: center; gap: 10px; min-height: 48px; margin: 0; padding: 6px; cursor: pointer; font-weight: 400; }
.category-choice input { width: 20px; height: 20px; min-height: 20px; flex: 0 0 20px; accent-color: #28664c; }
.category-choice:has(input:checked) { background: #eef2eb; border-radius: 8px; }
#list-count, .muted { color: #5b6861; font-size: 14px; font-weight: 400; }
.task-list { display: grid; gap: 14px; }
.task-card { padding: 16px; border: 1px solid #dfe5dc; border-radius: 16px; background: #fff; overflow-wrap: anywhere; }
.task-card h3 { margin: 0 0 10px; font-size: 18px; line-height: 1.4; }
.category-badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.category-badge { display: inline-block; max-width: 100%; margin: 0; padding: 4px 10px; border-radius: 999px; background: #edf0ed; color: #455249; font-size: 13px; font-weight: 650; line-height: 1.5; }
.category-compras { background: #fff1d6; color: #774700; }
.category-desarrollo_producto { background: #f0e8fc; color: #603687; }
.category-web { background: #e4efff; color: #24568a; }
.category-envios { background: #ddf3ee; color: #1a6355; }
.category-comunicacion_redes_sociales { background: #fce8ee; color: #8a3355; }
.description { margin: 0 0 8px; white-space: pre-wrap; color: #536158; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.task-meta { margin: 8px 0; color: #536158; font-size: 13px; }
.task-meta p { margin: 2px 0; }
#view-title { overflow-wrap: anywhere; }
#view-details { margin: 0 0 20px; }
.detail-fields dt { font-size: 13px; font-weight: 700; margin-top: 16px; }
.detail-fields dd { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; }
.audit-details { margin-top: 20px; border-top: 1px solid #dfe5dc; }
.audit-details summary { min-height: 48px; padding: 14px 0; cursor: pointer; font-weight: 650; }
.urls-field { margin: 20px 0 0; padding: 12px; border: 1px solid #bdc9bf; border-radius: 10px; }
.urls-field legend { font-size: 15px; font-weight: 600; }
.url-row { margin-bottom: 14px; }
.url-row label { margin: 0 0 8px; }
.url-row button { margin-top: 4px; background: transparent; border-color: transparent; }
.task-links { list-style: none; padding: 0; margin: 0; }
.task-links a { display: block; color: #206747; min-height: 48px; padding: 12px 0; overflow-wrap: anywhere; }
.description-block { margin: 12px 0; border: 1px solid #dfe5dc; border-radius: 10px; overflow: hidden; white-space: normal; }
.block-heading { margin: 0; padding: 10px 12px; background: #eef2eb; font-size: 13px; font-weight: 700; overflow-wrap: anywhere; }
.block-body { margin: 0; padding: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.description-block button, .comment-draft button { margin: 0 4px 4px; background: transparent; border-color: transparent; font-size: 14px; }
#edit-description-title { font-size: 15px; margin: 20px 0 8px; }
.comment-draft { margin: 16px 0; }
.task-card button { width: 100%; margin-top: 6px; }
.task-actions { display: flex; gap: 12px; margin-top: 10px; border-top: 1px solid #e5e9e1; padding-top: 6px; }
.task-actions button { width: auto; padding: 10px 14px; background: transparent; border-color: transparent; font-size: 14px; }
.danger { color: #8b2923; border-color: #d6b6b2; }
.danger:hover { background: #fff0ed; }
.result { border-top: 1px solid #e5e9e1; padding-top: 14px; }
.result-label { margin: 0 0 6px; font-size: 13px; font-weight: 700; }
.audit { margin: 6px 0 0; color: #5b6861; font-size: 13px; }
.empty { padding: 32px 16px; text-align: center; border: 1px dashed #bdc9bf; border-radius: 16px; color: #5b6861; }
.notice { color: #28664c; font-size: 14px; }
.notice:empty { display: none; }
.notice { position: sticky; top: 8px; z-index: 2; background: #e8f2e9; padding: 12px; border-radius: 10px; overflow-wrap: anywhere; }
.error { color: #8b2923; background: #fff0ed; padding: 12px; border-radius: 10px; overflow-wrap: anywhere; }
.session-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 20px; }
button:disabled { opacity: .6; cursor: wait; }
#login-panel { max-width: 400px; margin: 0 auto; }
#login-form label { margin: 18px 0 8px; }
#login-form button { margin-top: 24px; }
dialog { width: calc(100% - 24px); max-width: 480px; max-height: calc(100dvh - 32px); padding: 24px; border: 1px solid #d4dcd5; border-radius: 18px; color: #20332c; overflow-y: auto; }
dialog::backdrop { background: #15291f66; }
@media (max-width: 599px) {
  dialog { margin: auto auto 12px; padding: 20px; padding-bottom: max(20px, env(safe-area-inset-bottom)); }
}
dialog h2 { margin-bottom: 20px; }
dialog label { margin: 16px 0 8px; }
.form-actions { display: grid; gap: 10px; margin-top: 24px; }
.task-name { overflow-wrap: anywhere; }
@media (min-width: 600px) { .app { padding-top: 48px; } .tabs button { font-size: 16px; } }

@media (min-width: 600px) {
  .app { padding-inline: 24px; }
  #view-dialog, #create-dialog { width: calc(100% - 48px); max-width: 960px; padding: 28px; }
  #categories-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #view-dialog > .form-actions, #create-form > .form-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .url-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
  .url-row label { grid-column: 1 / -1; margin-bottom: 0; }
  .url-row button { margin-top: 0; }
}
@media (min-width: 700px) {
  .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: end; }
  .filters > div { grid-template-columns: minmax(0, 1fr); gap: 6px; }
}
@media (min-width: 1000px) {
  .filters { grid-template-columns: .8fr 1fr 1.15fr auto; }
  .task-card { display: grid; grid-template-columns: minmax(0, 1fr) 230px; column-gap: 24px; align-items: start; }
  .task-card > * { grid-column: 1; }
  .task-card > button { grid-column: 2; grid-row: 1 / 3; margin-top: 0; }
  .task-card > .task-actions { grid-column: 2; grid-row: 3 / 5; align-self: end; }
}
