.discovery-view.is-task-board .home-carousel,
.discovery-view.is-task-board .mobile-feed-search { display: none; }
.discovery-view.is-task-board .mobile-home-feed { margin-top: 24px; }
.discovery-view.is-task-board .mobile-home-content { display: block; }

.tasks-board { width: 100%; color: #172033; }
.tasks-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.tasks-scope { display: inline-flex; gap: 3px; padding: 4px; border: 1px solid #dce5ef; border-radius: 8px; background: #f4f7fb; }
.tasks-scope button { min-height: 36px; padding: 7px 12px; border: 0; border-radius: 5px; color: #6e7d91; background: transparent; font: inherit; font-size: 12px; font-weight: 700; white-space: nowrap; cursor: pointer; }
.tasks-scope button[aria-pressed="true"] { color: #194e9f; background: #fff; box-shadow: 0 1px 5px #273f601c; }
.task-create-button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 14px; border: 1px solid #2c6cce; border-radius: 7px; color: #fff; background: #2c6cce; font: inherit; font-size: 13px; font-weight: 750; cursor: pointer; }
.task-create-button:hover, .task-dialog-submit:hover { background: #1559b6; }
.task-create-button svg { width: 17px; height: 17px; }
.tasks-filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.tasks-filters label { min-width: 0; display: grid; gap: 5px; color: #697890; font-size: 11px; font-weight: 700; }
.tasks-filters select { width: 100%; min-width: 0; height: 42px; padding: 0 12px; border: 1px solid #dce5ef; border-radius: 7px; color: #26364c; background: #fff; font: inherit; font-size: 12px; }
.tasks-list { display: grid; gap: 11px; }
.task-card { min-width: 0; padding: 18px; border: 1px solid #dce5ef; border-radius: 8px; background: #fff; box-shadow: 0 8px 22px #335b8a0a; }
.task-card.is-closed { opacity: .7; }
.task-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: #738199; font-size: 11px; font-weight: 700; }
.task-category { color: #2268c4; text-transform: uppercase; }
.task-card h3 { margin: 12px 0 7px; color: #172033; font-size: 18px; line-height: 1.25; }
.task-description { margin: 0; color: #34435a; font-size: 13px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.task-card-meta { display: flex; justify-content: space-between; gap: 10px; margin-top: 15px; color: #75839a; font-size: 11px; }
.task-card-meta span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-card-meta time { flex: none; }
.task-card-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid #edf1f6; }
.task-card-actions button { min-height: 35px; display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px; border: 1px solid #ccd9eb; border-radius: 6px; color: #245cae; background: #f7fbff; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.task-card-actions button:hover { background: #eaf3ff; }
.task-card-actions button svg { width: 15px; height: 15px; }
.task-responded { display: inline-flex; align-items: center; gap: 5px; color: #168166; font-size: 12px; font-weight: 700; }
.task-responded svg { width: 15px; height: 15px; }
.task-responses { display: grid; gap: 9px; margin-top: 16px; padding-top: 14px; border-top: 1px solid #edf1f6; }
.task-responses > strong { font-size: 12px; }
.task-response-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid #edf1f6; }
.task-response-row > div { min-width: 0; }
.task-response-row b { display: block; color: #172033; font-size: 12px; }
.task-response-row small { display: block; color: #75839a; font-size: 11px; }
.task-response-row p { margin: 6px 0 0; color: #34435a; font-size: 12px; line-height: 1.4; overflow-wrap: anywhere; }
.task-response-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 6px; }
.task-response-actions button { flex: none; padding: 6px 9px; border: 1px solid #ccd9eb; border-radius: 6px; color: #245cae; background: #fff; font: inherit; font-size: 11px; font-weight: 700; cursor: pointer; }
.task-response-actions button[data-accepted="true"] { border-color: #2c6cce; color: #fff; background: #2c6cce; }
.task-response-status { color: #738199; font-size: 11px; font-weight: 700; }
.task-response-status.is-accepted { color: #168166; }
@media (max-width: 640px) { .task-response-row { flex-direction: column; } .task-response-actions { justify-content: flex-start; } }
.task-reply-form { display: grid; gap: 10px; margin-top: 13px; }
.task-reply-form label { display: grid; gap: 6px; color: #34435a; font-size: 12px; font-weight: 700; }
.task-reply-form textarea { width: 100%; min-height: 88px; resize: vertical; padding: 11px 12px; border: 1px solid #cddae8; border-radius: 7px; color: #172033; background: #fbfdff; font: inherit; font-size: 13px; line-height: 1.45; }
.task-reply-form > div { display: flex; justify-content: flex-end; gap: 8px; }
.task-reply-form button { min-height: 36px; padding: 7px 12px; border: 1px solid #cddae8; border-radius: 6px; color: #34435a; background: #fff; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.task-reply-form button[type="submit"] { border-color: #2c6cce; color: #fff; background: #2c6cce; }
.tasks-empty { display: grid; gap: 5px; padding: 32px 18px; border: 1px dashed #cddae8; border-radius: 8px; color: #34435a; background: #fff; font-size: 13px; text-align: center; }
.tasks-empty strong { color: #172033; font-size: 15px; }
.tasks-empty button { border: 0; color: #246bd0; background: none; font: inherit; font-weight: 700; cursor: pointer; }

.task-dialog { width: min(520px, calc(100vw - 24px)); max-height: min(90dvh, 760px); padding: 0; border: 1px solid #dce5ef; border-radius: 9px; color: #172033; background: #fff; box-shadow: 0 24px 70px #10294b42; }
.task-dialog::backdrop { background: #15253d91; backdrop-filter: blur(5px); }
.task-dialog form { display: grid; gap: 16px; padding: 24px; overflow-y: auto; }
.task-dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.task-dialog-head small { color: #246bd0; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.task-dialog-head h2 { margin: 5px 0 0; font-size: 24px; line-height: 1.2; }
.task-dialog-head button { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid #dce5ef; border-radius: 50%; color: #52647c; background: #fff; cursor: pointer; }
.task-dialog-head svg { width: 17px; height: 17px; }
.task-dialog label { min-width: 0; display: grid; gap: 7px; color: #34435a; font-size: 12px; font-weight: 700; }
.task-dialog input, .task-dialog textarea, .task-dialog select { width: 100%; min-width: 0; padding: 11px 12px; border: 1px solid #cddae8; border-radius: 7px; outline-color: #7caef0; color: #172033; background: #fbfdff; font: inherit; font-size: 13px; font-weight: 400; }
.task-dialog textarea { min-height: 135px; resize: vertical; line-height: 1.45; }
.task-dialog-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.task-dialog-submit { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; border: 0; border-radius: 7px; color: #fff; background: #2c6cce; font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; }
.task-dialog-submit svg { width: 17px; height: 17px; }

:root[data-theme="dark"] .tasks-board,
:root[data-theme="dark"] .task-card h3,
:root[data-theme="dark"] .task-responses > strong,
:root[data-theme="dark"] .task-response-row b,
:root[data-theme="dark"] .tasks-empty strong,
:root[data-theme="dark"] .task-dialog { color: var(--ink); }
:root[data-theme="dark"] .task-card,
:root[data-theme="dark"] .tasks-empty,
:root[data-theme="dark"] .task-dialog { border-color: var(--line); background: var(--surface); }
:root[data-theme="dark"] .tasks-scope,
:root[data-theme="dark"] .task-dialog-head button,
:root[data-theme="dark"] .task-card-actions button,
:root[data-theme="dark"] .task-response-row button,
:root[data-theme="dark"] .task-reply-form button:not([type="submit"]) { border-color: var(--line); color: var(--ink); background: var(--surface-2); }
:root[data-theme="dark"] .tasks-scope button[aria-pressed="true"] { color: #dbe9ff; background: var(--accent-soft); }
:root[data-theme="dark"] .tasks-filters select,
:root[data-theme="dark"] .task-dialog input,
:root[data-theme="dark"] .task-dialog textarea,
:root[data-theme="dark"] .task-dialog select,
:root[data-theme="dark"] .task-reply-form textarea { border-color: var(--line); color: var(--ink); background: var(--surface-2); }
:root[data-theme="dark"] .task-description,
:root[data-theme="dark"] .task-response-row p,
:root[data-theme="dark"] .task-reply-form label,
:root[data-theme="dark"] .task-dialog label { color: var(--ink-soft); }
:root[data-theme="dark"] .task-card-meta,
:root[data-theme="dark"] .task-card-top,
:root[data-theme="dark"] .tasks-filters label { color: var(--muted); }
:root[data-theme="dark"] .task-card-actions,
:root[data-theme="dark"] .task-responses,
:root[data-theme="dark"] .task-response-row { border-color: var(--line); }

@media (max-width: 640px) {
  .tasks-toolbar { align-items: stretch; }
  .tasks-scope { flex: 1; }
  .tasks-scope button { flex: 1; padding-inline: 7px; }
  .task-create-button { padding-inline: 10px; }
  .task-card { padding: 15px; }
  .task-card h3 { font-size: 17px; }
  .task-dialog-fields { grid-template-columns: 1fr; }
  .task-dialog form { padding: 20px; }
}
