.board-tasks-button {
  color: #433cea;
}

.board-tasks-button .board-tasks-count {
  min-width: 20px;
}

body.reception-tasks-modal-open {
  overflow: hidden;
}

body.reception-tasks-modal-open #screen-board {
  filter: blur(7px) saturate(0.9);
  transform: scale(0.998);
  transition: filter 220ms ease, transform 220ms ease;
}

.reception-tasks-modal {
  position: fixed;
  inset: 0;
  z-index: 92;
  display: grid;
  place-items: center;
  padding: 24px;
}

.reception-tasks-modal[hidden] {
  display: none;
}

.reception-tasks-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(244, 247, 252, 0.6);
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
  opacity: 0;
  transition: opacity 220ms ease;
}

.reception-tasks-panel {
  position: relative;
  width: min(100%, 920px);
  max-height: min(860px, calc(100dvh - 48px));
  overflow: auto;
  padding: 30px;
  border: 1px solid rgba(39, 68, 125, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 28px 70px rgba(23, 42, 82, 0.16);
  opacity: 0;
  transform: translateY(14px) scale(0.99);
  transition: opacity 220ms ease, transform 220ms ease;
}

.reception-tasks-modal.is-open .reception-tasks-backdrop {
  opacity: 1;
}

.reception-tasks-modal.is-open .reception-tasks-panel {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.reception-tasks-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.reception-tasks-kicker {
  display: block;
  margin-bottom: 7px;
  color: #433cea;
  font-size: 0.7rem;
  font-weight: 820;
  letter-spacing: 0;
  text-transform: uppercase;
}

.reception-tasks-head h3 {
  margin: 0;
  color: #172b52;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
  font-size: clamp(1.8rem, 3.5vw, 2.45rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.reception-tasks-head p {
  max-width: 570px;
  margin: 8px 0 0;
  color: #687791;
  font-size: 0.9rem;
  line-height: 1.55;
}

.reception-tasks-close {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border: 1px solid rgba(39, 68, 125, 0.12);
  border-radius: 8px;
  background: #fff;
  color: #62708a;
  cursor: pointer;
  font-size: 1.45rem;
  line-height: 1;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.reception-tasks-close:hover {
  border-color: rgba(77, 87, 255, 0.24);
  background: #f5f6ff;
  color: #433cea;
}

.reception-tasks-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(39, 68, 125, 0.09);
}

.reception-tasks-tabs {
  display: inline-flex;
  min-width: 0;
  padding: 3px;
  border: 1px solid rgba(39, 68, 125, 0.1);
  border-radius: 9px;
  background: #f6f7fa;
}

.reception-tasks-tabs button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 0;
  border-radius: 6px;
  padding: 0 13px;
  background: transparent;
  color: #66748d;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 740;
  white-space: nowrap;
}

.reception-tasks-tabs button:hover {
  color: #24375a;
}

.reception-tasks-tabs button.is-active {
  background: #fff;
  color: #172b52;
  box-shadow: 0 2px 8px rgba(23, 42, 82, 0.08);
}

.reception-tasks-tabs button span {
  min-width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0 5px;
  background: #e9eaff;
  color: #433cea;
  font-size: 0.66rem;
  font-weight: 820;
}

.reception-tasks-new {
  min-height: 42px;
  border: 1px solid #433cea;
  border-radius: 8px;
  padding: 0 16px;
  background: #433cea;
  color: #fff;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 780;
  white-space: nowrap;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.reception-tasks-new:hover {
  border-color: #3731d9;
  background: #3731d9;
  transform: translateY(-1px);
}

.reception-task-form {
  margin: 20px 0 6px;
  padding: 20px;
  border: 1px solid rgba(77, 87, 255, 0.14);
  border-radius: 10px;
  background: #fafaff;
}

.reception-task-form[hidden] {
  display: none;
}

.reception-task-source {
  display: grid;
  gap: 3px;
  margin-bottom: 18px;
  padding: 11px 13px;
  border-left: 3px solid #706aff;
  border-radius: 0 7px 7px 0;
  background: #f1f2ff;
}

.reception-task-source[hidden] {
  display: none;
}

.reception-task-source span {
  color: #706aff;
  font-size: 0.65rem;
  font-weight: 820;
  text-transform: uppercase;
}

.reception-task-source strong {
  color: #24375a;
  font-size: 0.82rem;
}

.reception-task-source small {
  max-width: 100%;
  overflow: hidden;
  color: #65738c;
  font-size: 0.75rem;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reception-task-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(150px, 0.8fr) minmax(130px, 0.65fr);
  gap: 14px;
}

.reception-task-form-grid .field {
  width: 100%;
  max-width: none;
  margin: 0;
}

.reception-task-form-grid .is-wide {
  grid-column: 1 / -1;
}

.reception-task-form-grid .field-label {
  margin-bottom: 7px;
  color: #2d4062;
  font-size: 0.76rem;
  font-weight: 780;
}

.reception-task-form-grid .field-input {
  min-height: 46px;
  border-color: rgba(39, 68, 125, 0.14);
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
  font-size: 0.83rem;
}

.reception-task-form-grid .field-input:focus {
  border-color: rgba(77, 87, 255, 0.38);
  box-shadow: 0 0 0 4px rgba(77, 87, 255, 0.07);
}

.reception-task-form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.reception-task-form-actions .text-button,
.reception-task-form-actions .form-button {
  min-width: 120px;
  min-height: 42px;
  height: 42px;
  border-radius: 8px;
  padding: 0 16px;
  font-size: 0.78rem;
}

.reception-task-feedback {
  margin: 12px 0 0;
  color: #b84747;
  font-size: 0.78rem;
  font-weight: 680;
  line-height: 1.45;
}

.reception-task-feedback[hidden],
.reception-task-feedback:empty {
  display: none;
}

.reception-task-feedback.is-success {
  color: #28775c;
}

.reception-tasks-list {
  display: grid;
  gap: 10px;
  padding-top: 18px;
}

.reception-task-card {
  position: relative;
  display: grid;
  gap: 10px;
  padding: 16px 18px;
  border: 1px solid rgba(39, 68, 125, 0.11);
  border-radius: 8px;
  background: #fff;
}

.reception-task-card::before {
  content: "";
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: -1px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: #8c88ff;
}

.reception-task-card.is-in_progress::before {
  background: #4d8fdc;
}

.reception-task-card.is-completed::before {
  background: #45a27d;
}

.reception-task-card.is-overdue::before {
  background: #d45b62;
}

.reception-task-card-head,
.reception-task-card-foot,
.reception-task-card-actions,
.reception-task-meta {
  display: flex;
  align-items: center;
}

.reception-task-card-head {
  justify-content: space-between;
  gap: 12px;
}

.reception-task-status {
  color: #5750e9;
  font-size: 0.68rem;
  font-weight: 820;
  text-transform: uppercase;
}

.reception-task-card.is-in_progress .reception-task-status {
  color: #3178c2;
}

.reception-task-card.is-completed .reception-task-status {
  color: #2d8768;
}

.reception-task-deadline {
  color: #687791;
  font-size: 0.72rem;
  font-weight: 700;
  text-align: right;
}

.reception-task-card.is-overdue .reception-task-deadline {
  color: #b8474f;
}

.reception-task-card h4 {
  margin: 0;
  color: #172b52;
  font-size: 0.98rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.reception-task-meta {
  flex-wrap: wrap;
  gap: 7px;
}

.reception-task-assignee,
.reception-task-linked-note {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 9px;
  font-size: 0.68rem;
  font-weight: 740;
}

.reception-task-assignee {
  background: #eff0ff;
  color: #433cea;
}

.reception-task-linked-note {
  max-width: min(100%, 330px);
  overflow: hidden;
  background: #f2f4f8;
  color: #61708a;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reception-task-card-foot {
  justify-content: space-between;
  gap: 14px;
  padding-top: 10px;
  border-top: 1px solid rgba(39, 68, 125, 0.08);
}

.reception-task-card-foot > small {
  color: #8490a5;
  font-size: 0.67rem;
  line-height: 1.4;
}

.reception-task-card-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
}

.reception-task-quiet-action,
.reception-task-status-action {
  min-height: 34px;
  border: 1px solid rgba(39, 68, 125, 0.12);
  border-radius: 7px;
  padding: 0 10px;
  background: #fff;
  color: #596882;
  cursor: pointer;
  font-size: 0.69rem;
  font-weight: 740;
}

.reception-task-quiet-action:hover,
.reception-task-status-action:hover {
  border-color: rgba(77, 87, 255, 0.24);
  background: #f7f8ff;
  color: #433cea;
}

.reception-task-status-action.is-primary {
  border-color: #433cea;
  background: #433cea;
  color: #fff;
}

.reception-task-status-action.is-primary:hover {
  border-color: #3731d9;
  background: #3731d9;
  color: #fff;
}

.reception-task-quiet-action.is-danger {
  color: #b84747;
}

.reception-task-quiet-action.is-danger:hover,
.reception-task-quiet-action.is-danger.is-confirming {
  border-color: rgba(184, 71, 71, 0.2);
  background: #fff4f4;
  color: #a63838;
}

.reception-tasks-empty {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 54px 20px 38px;
  color: #7a879d;
  text-align: center;
}

.reception-tasks-empty[hidden] {
  display: none;
}

.reception-tasks-empty strong {
  color: #344765;
  font-size: 0.92rem;
}

.reception-tasks-empty span {
  max-width: 460px;
  font-size: 0.78rem;
  line-height: 1.5;
}

.reception-tasks-modal.is-loading .reception-tasks-list {
  opacity: 0.55;
  pointer-events: none;
}

@media (max-width: 860px) {
  .reception-tasks-modal {
    padding: 16px;
  }

  .reception-tasks-panel {
    max-height: calc(100dvh - 32px);
    padding: 24px;
  }

  .reception-tasks-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .reception-tasks-tabs {
    width: 100%;
  }

  .reception-tasks-tabs button {
    flex: 1 1 0;
    justify-content: center;
  }

  .reception-tasks-new {
    align-self: flex-end;
  }

  .reception-task-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .reception-task-form-grid .field:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 620px) {
  .reception-tasks-modal {
    align-items: stretch;
    padding: 8px;
  }

  .reception-tasks-panel {
    width: 100%;
    max-height: calc(100dvh - 16px);
    padding: 20px 16px;
    border-radius: 12px;
  }

  .reception-tasks-head {
    gap: 14px;
    margin-bottom: 20px;
  }

  .reception-tasks-head h3 {
    font-size: 1.8rem;
  }

  .reception-tasks-tabs {
    overflow-x: auto;
  }

  .reception-tasks-tabs button {
    min-width: max-content;
    padding: 0 11px;
  }

  .reception-tasks-new {
    width: 100%;
  }

  .reception-task-form {
    padding: 16px;
  }

  .reception-task-form-grid {
    grid-template-columns: 1fr;
  }

  .reception-task-form-grid .field,
  .reception-task-form-grid .field:last-child {
    grid-column: 1;
  }

  .reception-task-form-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .reception-task-form-actions .text-button,
  .reception-task-form-actions .form-button {
    width: 100%;
  }

  .reception-task-card {
    padding: 15px;
  }

  .reception-task-card-head,
  .reception-task-card-foot {
    align-items: flex-start;
    flex-direction: column;
  }

  .reception-task-deadline {
    text-align: left;
  }

  .reception-task-card-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .board-panel-actions {
    grid-template-columns: repeat(6, minmax(40px, 44px));
    gap: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reception-tasks-backdrop,
  .reception-tasks-panel,
  body.reception-tasks-modal-open #screen-board {
    transition: none;
  }
}
