:root {
  --board-bg: #eef1f4;
  --card-bg: #ffffff;
  --text-soft: #5f6877;
  --ink: #243041;
  --whiteboard: #fbfcfd;
}

[data-theme="dark"] {
  --bulma-body-background-color: #12151b;
  --bulma-body-color: #edf1f7;
  --board-bg: #191e27;
  --card-bg: #202632;
  --text-soft: #aab3c2;
  --ink: #edf1f7;
  --whiteboard: #171c24;
}

body {
  min-height: 100vh;
  background: var(--board-bg);
}

.board-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.board-title,
.board-section-title,
.member-board-title,
.task-title {
  letter-spacing: 0;
}

.board-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.auth-panel {
  max-width: 440px;
  margin: 2rem auto;
  background: var(--card-bg);
  padding: 2rem;
  border: 1px solid rgba(127, 127, 127, 0.18);
  border-radius: 8px;
}

.member-board,
.task-row,
.empty-board {
  background: var(--card-bg);
  border: 1px solid rgba(127, 127, 127, 0.18);
  border-radius: 8px;
}

.whiteboard {
  background:
    linear-gradient(rgba(43, 80, 120, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(43, 80, 120, 0.035) 1px, transparent 1px),
    var(--whiteboard);
  background-size: 32px 32px;
  border: 1px solid rgba(100, 116, 139, 0.18);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(31, 41, 55, 0.08);
  padding: clamp(1rem, 2vw, 1.5rem);
}

.whiteboard-section {
  min-height: 18rem;
}

.board-section-title {
  color: var(--ink);
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0;
}

.board-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.task-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.task-grid {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.task-row {
  --task-color: #3273dc;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-left: 6px solid var(--task-color);
  padding: 0.85rem 1rem;
  color: var(--ink);
  box-shadow: 0 4px 12px rgba(31, 41, 55, 0.06);
}

.task-main {
  min-width: 0;
  flex: 1 1 auto;
}

.task-line {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}

.task-marker {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 999px;
  background: var(--task-color);
  flex: 0 0 auto;
}

.task-title {
  font-family: "Segoe Print", "Bradley Hand", "Comic Sans MS", cursive;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
  overflow-wrap: anywhere;
}

.task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  color: var(--text-soft);
  font-size: 0.78rem;
  margin-top: 0.35rem;
}

.task-description {
  font-size: 1.02rem;
  margin-top: 0.85rem;
}

.task-row.urgent {
  box-shadow: 0 0 0 2px rgba(255, 56, 96, 0.18);
}

.task-row.status-in_progress {
  background: #eef7ff;
  border-left-color: #1677c7;
  box-shadow: 0 0 0 2px rgba(22, 119, 199, 0.16), 0 4px 12px rgba(31, 41, 55, 0.06);
}

[data-theme="dark"] .task-row.status-in_progress {
  background: #18283a;
}

.task-row.status-in_progress .task-marker {
  background: #1677c7;
  box-shadow: 0 0 0 4px rgba(22, 119, 199, 0.16);
}

.task-status-tag {
  flex: 0 0 auto;
}

.progress-button.is-selected {
  font-weight: 700;
  box-shadow: 0 0 0 2px rgba(22, 119, 199, 0.2);
}

.task-row.status-complete .task-title,
.task-row.status-complete .task-description {
  text-decoration: line-through;
  text-decoration-thickness: 2px;
  color: var(--text-soft);
}

.member-board {
  padding: 1rem;
  min-height: 12rem;
  box-shadow: 0 8px 18px rgba(31, 41, 55, 0.06);
  cursor: pointer;
  transition: border-color 140ms ease, transform 140ms ease;
}

.member-board:hover {
  border-color: rgba(50, 115, 220, 0.45);
  transform: translateY(-1px);
}

.member-board-title {
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.member-board-title a {
  color: inherit;
}

.team-board-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 1rem;
}

.empty-board {
  padding: 2rem;
  color: var(--text-soft);
  text-align: center;
}

.notes {
  margin-top: 0.75rem;
  padding: 0.75rem;
  background: rgba(127, 127, 127, 0.08);
  border-radius: 6px;
  font-size: 0.9rem;
}

.task-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem;
  flex-wrap: wrap;
  flex: 0 0 auto;
  max-width: min(48%, 520px);
}

.task-actions form {
  margin: 0;
}

.task-actions .button {
  height: 2em;
  line-height: 1;
}

.attach-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  vertical-align: middle;
}

.reject-form,
.complete-form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.reject-form .input {
  width: 9rem;
}

.note-form {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.note-form .input {
  width: 8rem;
}

.task-icon-button {
  width: 2.2em;
  padding-left: 0;
  padding-right: 0;
}

.task-switches {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem 1rem;
  margin-top: 1rem;
}

.task-modal-card {
  width: min(96vw, 640px);
}

.color-dot {
  display: inline-block;
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 999px;
  margin-right: 0.4rem;
}

.notification-menu {
  width: min(92vw, 420px);
  max-width: 420px;
  padding: 0.5rem;
}

.notification-menu-head,
.notification-menu-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.65rem;
}

.notification-menu-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem;
  border-radius: 6px;
}

.notification-menu-item + .notification-menu-item {
  margin-top: 0.25rem;
}

.notification-menu-item.is-unread {
  background: #eef7ff;
}

[data-theme="dark"] .notification-menu-item.is-unread {
  background: #18283a;
}

.notification-menu-link {
  color: inherit;
  display: block;
  font-size: 0.9rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
  white-space: normal;
}

.notification-menu-empty {
  color: var(--text-soft);
  padding: 0.8rem 0.65rem;
}

.notification-center {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  max-width: 980px;
}

.notification-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--card-bg);
  border: 1px solid rgba(127, 127, 127, 0.18);
  border-radius: 8px;
  padding: 0.9rem 1rem;
}

.notification-row.is-unread {
  border-left: 5px solid #1677c7;
  background: #eef7ff;
}

[data-theme="dark"] .notification-row.is-unread {
  background: #18283a;
}

.notification-row-main {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  min-width: 0;
}

.notification-dot {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 999px;
  background: #9aa4b2;
  flex: 0 0 auto;
  margin-top: 0.4rem;
}

.notification-row.is-unread .notification-dot {
  background: #1677c7;
}

.notification-message {
  color: var(--ink);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.notification-time {
  color: var(--text-soft);
  font-size: 0.82rem;
  margin-top: 0.2rem;
}

.notification-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex: 0 0 auto;
}

.toast {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 40;
  background: #1f2937;
  color: white;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
  .board-header {
    align-items: stretch;
    flex-direction: column;
  }

  .board-tools {
    justify-content: stretch;
  }

  .board-tools .select,
  .board-tools .select select,
  .board-tools .button {
    width: 100%;
  }

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

  .reject-form,
  .complete-form,
  .note-form {
    align-items: stretch;
    width: 100%;
  }

  .reject-form .input,
  .reject-form .button,
  .complete-form .button,
  .complete-form .file,
  .note-form .input,
  .note-form .button {
    width: 100%;
  }

  .task-row {
    align-items: stretch;
    flex-direction: column;
  }

  .task-actions {
    justify-content: flex-start;
    max-width: none;
    width: 100%;
  }

  .notification-row {
    align-items: stretch;
    flex-direction: column;
  }

  .notification-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}
